aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-06-12 00:52:23 +0000
committerChristian Grothoff <christian@grothoff.org>2009-06-12 00:52:23 +0000
commite785620e70ca5213d4aca91cd48e95b70eca0c81 (patch)
tree7d00dd231aac95bee750e2f98041d9fc600c3682 /src
parent9014a563e22c07927b8c319d1458d96fe0a35f67 (diff)
downloadgnunet-e785620e70ca5213d4aca91cd48e95b70eca0c81.tar.gz
gnunet-e785620e70ca5213d4aca91cd48e95b70eca0c81.zip
fixing waitpid usage issues
Diffstat (limited to 'src')
-rw-r--r--src/util/os_priority.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 0dfc9cafe..16537dfcd 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -272,7 +272,8 @@ GNUNET_OS_process_status (pid_t proc, enum GNUNET_OS_ProcessStatusType *type,
272 int status; 272 int status;
273 int ret; 273 int ret;
274 274
275 ret = waitpid (0, &status, WNOHANG); 275 GNUNET_assert (0 != proc);
276 ret = waitpid (proc, &status, WNOHANG);
276 if ( (0 == ret) || 277 if ( (0 == ret) ||
277 ( (-1 == ret) && 278 ( (-1 == ret) &&
278 (ECHILD == errno) ) ) 279 (ECHILD == errno) ) )