replacing GNUNET_OS_process_get_pid
authorNathan S. Evans <evans@in.tum.de>
Thu, 4 Nov 2010 10:12:20 +0000 (10:12 +0000)
committerNathan S. Evans <evans@in.tum.de>
Thu, 4 Nov 2010 10:12:20 +0000 (10:12 +0000)
src/include/gnunet_os_lib.h
src/util/os_priority.c

index bb29e89df807fa418c083f7e8c3aed07146e1fc8..5ff2b48633a96bf0c4ac42184cd8ddcf1698efe1 100644 (file)
@@ -204,6 +204,15 @@ int GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
  */
 void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
 
+/**
+ * Get the pid of the process in question
+ *
+ * @param proc the process to get the pid of
+ *
+ * @return the current process id
+ */
+pid_t
+GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
 
 /**
  * Set process priority
index 5f78e21798fe145a1edbd433502384af8fb479cf..1b506fec2efe38dd7f0a9233f8a7cc44e9872b67 100644 (file)
@@ -101,6 +101,18 @@ GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig)
 #endif
 }
 
+/**
+ * Get the pid of the process in question
+ *
+ * @param proc the process to get the pid of
+ *
+ * @return the current process id
+ */
+pid_t
+GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc)
+{
+  return proc->pid;
+}
 
 void
 GNUNET_OS_process_close (struct GNUNET_OS_Process *proc)