aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-10 21:51:54 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-10 21:51:54 +0000
commitda6e72d97f0125825d5348d12b75b39efc7d2b39 (patch)
tree27049396e968c9e3cff761555538079cb05d1f67 /src
parent09f33b79ebc1c117aba76602bdd9e1c3fa0cda1a (diff)
downloadgnunet-da6e72d97f0125825d5348d12b75b39efc7d2b39.tar.gz
gnunet-da6e72d97f0125825d5348d12b75b39efc7d2b39.zip
-closing of control pipe is no error
Diffstat (limited to 'src')
-rw-r--r--src/util/os_priority.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 4f3c5e622..30421a197 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -326,6 +326,7 @@ parent_control_handler (void *cls,
326{ 326{
327 struct GNUNET_DISK_FileHandle *control_pipe = cls; 327 struct GNUNET_DISK_FileHandle *control_pipe = cls;
328 char sig; 328 char sig;
329 ssize_t ret;
329 330
330 LOG (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", __FUNCTION__, 331 LOG (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", __FUNCTION__,
331 tc->reason); 332 tc->reason);
@@ -336,10 +337,11 @@ parent_control_handler (void *cls,
336 GNUNET_DISK_file_close (control_pipe); 337 GNUNET_DISK_file_close (control_pipe);
337 return; 338 return;
338 } 339 }
339 if (GNUNET_DISK_file_read (control_pipe, &sig, sizeof (sig)) != 340 ret = GNUNET_DISK_file_read (control_pipe, &sig, sizeof (sig));
340 sizeof (sig)) 341 if (sizeof (sig) != ret)
341 { 342 {
342 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "GNUNET_DISK_file_read"); 343 if (-1 == ret)
344 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "GNUNET_DISK_file_read");
343 GNUNET_DISK_file_close (control_pipe); 345 GNUNET_DISK_file_close (control_pipe);
344 return; 346 return;
345 } 347 }