diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2021-09-07 14:50:20 +0200 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2021-09-07 14:50:20 +0200 |
commit | 6e1bb6601e21a3329950129b9dc39e05746e3b65 (patch) | |
tree | dfc20058c8b430ef37c059ec21c2905168a07084 /src/util/os_priority.c | |
parent | 382fc8faaf4ccccd870dc7e746a9f002f3f6cfd1 (diff) | |
parent | 3da9cbd621a98c885a0c633ddaec0a84aa8a8e66 (diff) | |
download | gnunet-6e1bb6601e21a3329950129b9dc39e05746e3b65.tar.gz gnunet-6e1bb6601e21a3329950129b9dc39e05746e3b65.zip |
-Merge branch 'master' into dev/vanni/build-info
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r-- | src/util/os_priority.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 1ed9bcbf7..08320b291 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -47,7 +47,6 @@ struct GNUNET_OS_Process | |||
47 | */ | 47 | */ |
48 | pid_t pid; | 48 | pid_t pid; |
49 | 49 | ||
50 | |||
51 | /** | 50 | /** |
52 | * Pipe we use to signal the process. | 51 | * Pipe we use to signal the process. |
53 | * NULL if unused, or if process was deemed uncontrollable. | 52 | * NULL if unused, or if process was deemed uncontrollable. |
@@ -301,7 +300,8 @@ GNUNET_OS_process_destroy (struct GNUNET_OS_Process *proc) | |||
301 | * @param flags open flags (O_RDONLY, O_WRONLY) | 300 | * @param flags open flags (O_RDONLY, O_WRONLY) |
302 | */ | 301 | */ |
303 | static void | 302 | static void |
304 | open_dev_null (int target_fd, int flags) | 303 | open_dev_null (int target_fd, |
304 | int flags) | ||
305 | { | 305 | { |
306 | int fd; | 306 | int fd; |
307 | 307 | ||
@@ -316,7 +316,7 @@ open_dev_null (int target_fd, int flags) | |||
316 | if (-1 == dup2 (fd, target_fd)) | 316 | if (-1 == dup2 (fd, target_fd)) |
317 | { | 317 | { |
318 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "dup2"); | 318 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "dup2"); |
319 | (void) close (fd); | 319 | GNUNET_break (0 == close (fd)); |
320 | return; | 320 | return; |
321 | } | 321 | } |
322 | GNUNET_break (0 == close (fd)); | 322 | GNUNET_break (0 == close (fd)); |
@@ -395,7 +395,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, | |||
395 | if (NULL != childpipe_write) | 395 | if (NULL != childpipe_write) |
396 | GNUNET_DISK_file_close (childpipe_write); | 396 | GNUNET_DISK_file_close (childpipe_write); |
397 | if (0 <= dup_childpipe_read_fd) | 397 | if (0 <= dup_childpipe_read_fd) |
398 | close (dup_childpipe_read_fd); | 398 | GNUNET_break (0 == close (dup_childpipe_read_fd)); |
399 | return NULL; | 399 | return NULL; |
400 | } | 400 | } |
401 | childpipe_read_fd = dup_childpipe_read_fd; | 401 | childpipe_read_fd = dup_childpipe_read_fd; |
@@ -474,7 +474,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, | |||
474 | if (NULL != childpipe_write) | 474 | if (NULL != childpipe_write) |
475 | GNUNET_DISK_file_close (childpipe_write); | 475 | GNUNET_DISK_file_close (childpipe_write); |
476 | if (0 <= childpipe_read_fd) | 476 | if (0 <= childpipe_read_fd) |
477 | close (childpipe_read_fd); | 477 | GNUNET_break (0 == close (childpipe_read_fd)); |
478 | errno = eno; | 478 | errno = eno; |
479 | return NULL; | 479 | return NULL; |
480 | } | 480 | } |
@@ -486,7 +486,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, | |||
486 | gnunet_proc->control_pipe = childpipe_write; | 486 | gnunet_proc->control_pipe = childpipe_write; |
487 | if (0 != (std_inheritance & GNUNET_OS_USE_PIPE_CONTROL)) | 487 | if (0 != (std_inheritance & GNUNET_OS_USE_PIPE_CONTROL)) |
488 | { | 488 | { |
489 | close (childpipe_read_fd); | 489 | GNUNET_break (0 == close (childpipe_read_fd)); |
490 | } | 490 | } |
491 | GNUNET_array_grow (lscp, ls, 0); | 491 | GNUNET_array_grow (lscp, ls, 0); |
492 | return gnunet_proc; | 492 | return gnunet_proc; |
@@ -564,7 +564,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, | |||
564 | { | 564 | { |
565 | /* Bury any existing FD, no matter what; they should all be closed | 565 | /* Bury any existing FD, no matter what; they should all be closed |
566 | * on exec anyway and the important ones have been dup'ed away */ | 566 | * on exec anyway and the important ones have been dup'ed away */ |
567 | (void) close (tgt); | 567 | GNUNET_break (0 == close (tgt)); |
568 | GNUNET_assert (-1 != dup2 (lscp[i], tgt)); | 568 | GNUNET_assert (-1 != dup2 (lscp[i], tgt)); |
569 | } | 569 | } |
570 | /* unset close-on-exec flag */ | 570 | /* unset close-on-exec flag */ |