From: Nathan S. Evans Date: Thu, 4 Nov 2010 10:12:20 +0000 (+0000) Subject: replacing GNUNET_OS_process_get_pid X-Git-Tag: initial-import-from-subversion-38251~19843 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a765528e96799978381149bd9096aceb6071be86;p=oweals%2Fgnunet.git replacing GNUNET_OS_process_get_pid --- 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)