From e22f71507f3ea87ca5d86fd279e80833195b3227 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 30 May 2012 12:56:40 +0000 Subject: [PATCH] -better errno handling --- src/util/os_priority.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.25.1