aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96>2010-11-04 10:12:20 +0000
committernevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96>2010-11-04 10:12:20 +0000
commitd003b783790360f6cd998930f8afec4e867a4c3d (patch)
treeda9a83bf3a9853e7545406791652c36e7bd77ec6
parenta126b6451cf43520a1fb5d00c433f91d9bb062ed (diff)
replacing GNUNET_OS_process_get_pid
git-svn-id: https://gnunet.org/svn/gnunet@13545 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r--src/include/gnunet_os_lib.h9
-rw-r--r--src/util/os_priority.c12
2 files changed, 21 insertions, 0 deletions
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index bb29e89df8..5ff2b48633 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -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
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 5f78e21798..1b506fec2e 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -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)