diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-25 19:57:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-25 19:57:42 +0000 |
commit | 1d670b00843948c8e23ef7020e08a91852798c6d (patch) | |
tree | d6b0922ffec062706e79c2e711ab9ecfccfea4ea /src/util | |
parent | e2df1d3482ac329f003fa41a0fc820c1b27143c3 (diff) | |
download | gnunet-1d670b00843948c8e23ef7020e08a91852798c6d.tar.gz gnunet-1d670b00843948c8e23ef7020e08a91852798c6d.zip |
-do not abort waitpid just because of SIGCHLD
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/os_priority.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index b344cd862..f9683bd81 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -1399,9 +1399,15 @@ GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc) | |||
1399 | 1399 | ||
1400 | #ifndef MINGW | 1400 | #ifndef MINGW |
1401 | pid_t pid = proc->pid; | 1401 | pid_t pid = proc->pid; |
1402 | pid_t ret; | ||
1402 | 1403 | ||
1403 | if (pid != waitpid (pid, NULL, 0)) | 1404 | while ( (pid != (ret = waitpid (pid, NULL, 0))) && |
1405 | (EINTR == errno) ) ; | ||
1406 | if (pid != ret) | ||
1407 | { | ||
1408 | LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | ||
1404 | return GNUNET_SYSERR; | 1409 | return GNUNET_SYSERR; |
1410 | } | ||
1405 | return GNUNET_OK; | 1411 | return GNUNET_OK; |
1406 | #else | 1412 | #else |
1407 | HANDLE h; | 1413 | HANDLE h; |