aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_priority.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-30 12:56:40 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-30 12:56:40 +0000
commite22f71507f3ea87ca5d86fd279e80833195b3227 (patch)
treed9529507e96342125a8f37c2c936db140ab96822 /src/util/os_priority.c
parenta77f1ebf0dd113334daff34f854f9b13018fe16a (diff)
downloadgnunet-e22f71507f3ea87ca5d86fd279e80833195b3227.tar.gz
gnunet-e22f71507f3ea87ca5d86fd279e80833195b3227.zip
-better errno handling
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r--src/util/os_priority.c6
1 files changed, 6 insertions, 0 deletions
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,
811 ret = fork (); 811 ret = fork ();
812 if (-1 == ret) 812 if (-1 == ret)
813 { 813 {
814 int eno = errno;
815
814 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork"); 816 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork");
815 GNUNET_free_non_null (childpipename); 817 GNUNET_free_non_null (childpipename);
818 errno = eno;
816 return NULL; 819 return NULL;
817 } 820 }
818 if (0 != ret) 821 if (0 != ret)
@@ -1184,9 +1187,12 @@ GNUNET_OS_start_process_v (int pipe_control,
1184 ret = fork (); 1187 ret = fork ();
1185 if (-1 == ret) 1188 if (-1 == ret)
1186 { 1189 {
1190 int eno = errno;
1191
1187 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork"); 1192 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "fork");
1188 GNUNET_free_non_null (childpipename); 1193 GNUNET_free_non_null (childpipename);
1189 GNUNET_array_grow (lscp, ls, 0); 1194 GNUNET_array_grow (lscp, ls, 0);
1195 errno = eno;
1190 return NULL; 1196 return NULL;
1191 } 1197 }
1192 if (0 != ret) 1198 if (0 != ret)