diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-11-04 10:12:20 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-11-04 10:12:20 +0000 |
commit | a765528e96799978381149bd9096aceb6071be86 (patch) | |
tree | da9a83bf3a9853e7545406791652c36e7bd77ec6 | |
parent | c294cdb06485cd04e4c286064e8a684cc27fd55e (diff) | |
download | gnunet-a765528e96799978381149bd9096aceb6071be86.tar.gz gnunet-a765528e96799978381149bd9096aceb6071be86.zip |
replacing GNUNET_OS_process_get_pid
-rw-r--r-- | src/include/gnunet_os_lib.h | 9 | ||||
-rw-r--r-- | src/util/os_priority.c | 12 |
2 files changed, 21 insertions, 0 deletions
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); | |||
204 | */ | 204 | */ |
205 | void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc); | 205 | void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc); |
206 | 206 | ||
207 | /** | ||
208 | * Get the pid of the process in question | ||
209 | * | ||
210 | * @param proc the process to get the pid of | ||
211 | * | ||
212 | * @return the current process id | ||
213 | */ | ||
214 | pid_t | ||
215 | GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc); | ||
207 | 216 | ||
208 | /** | 217 | /** |
209 | * Set process priority | 218 | * 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) | |||
101 | #endif | 101 | #endif |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | ||
105 | * Get the pid of the process in question | ||
106 | * | ||
107 | * @param proc the process to get the pid of | ||
108 | * | ||
109 | * @return the current process id | ||
110 | */ | ||
111 | pid_t | ||
112 | GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc) | ||
113 | { | ||
114 | return proc->pid; | ||
115 | } | ||
104 | 116 | ||
105 | void | 117 | void |
106 | GNUNET_OS_process_close (struct GNUNET_OS_Process *proc) | 118 | GNUNET_OS_process_close (struct GNUNET_OS_Process *proc) |