From: Christian Grothoff Date: Wed, 30 May 2012 12:56:40 +0000 (+0000) Subject: -better errno handling X-Git-Tag: initial-import-from-subversion-38251~13353 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e22f71507f3ea87ca5d86fd279e80833195b3227;p=oweals%2Fgnunet.git -better errno handling --- diff --git a/src/util/os_priority.c b/src/util/os_priority.c index fefb6a98c..b8b1ba180 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -811,8 +811,11 @@ GNUNET_OS_start_process_vap (int pipe_control, ret = fork (); if (-1 == ret) { + int eno = errno; + LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork"); GNUNET_free_non_null (childpipename); + errno = eno; return NULL; } if (0 != ret) @@ -1184,9 +1187,12 @@ GNUNET_OS_start_process_v (int pipe_control, ret = fork (); if (-1 == ret) { + int eno = errno; + LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork"); GNUNET_free_non_null (childpipename); GNUNET_array_grow (lscp, ls, 0); + errno = eno; return NULL; } if (0 != ret)