From a765528e96799978381149bd9096aceb6071be86 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 4 Nov 2010 10:12:20 +0000 Subject: [PATCH] replacing GNUNET_OS_process_get_pid --- src/include/gnunet_os_lib.h | 9 +++++++++ src/util/os_priority.c | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index bb29e89df..5ff2b4863 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 5f78e2179..1b506fec2 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) -- 2.25.1