diff options
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r-- | src/util/os_priority.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index a7ce0c5e5..3b3b022b9 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -595,11 +595,7 @@ GNUNET_OS_start_process_va (struct GNUNET_DISK_PipeHandle *pipe_stdin, | |||
595 | &fd_stdin_write, sizeof (int)); | 595 | &fd_stdin_write, sizeof (int)); |
596 | } | 596 | } |
597 | 597 | ||
598 | #if HAVE_WORKING_VFORK | ||
599 | ret = vfork (); | ||
600 | #else | ||
601 | ret = fork (); | 598 | ret = fork (); |
602 | #endif | ||
603 | if (ret != 0) | 599 | if (ret != 0) |
604 | { | 600 | { |
605 | if (ret == -1) | 601 | if (ret == -1) |
@@ -611,22 +607,6 @@ GNUNET_OS_start_process_va (struct GNUNET_DISK_PipeHandle *pipe_stdin, | |||
611 | } | 607 | } |
612 | else | 608 | else |
613 | { | 609 | { |
614 | |||
615 | #if HAVE_WORKING_VFORK | ||
616 | /* let's hope vfork actually works; for some extreme cases (including | ||
617 | * a testcase) we need 'execvp' to have run before we return, since | ||
618 | * we may send a signal to the process next and we don't want it | ||
619 | * to be caught by OUR signal handler (but either by the default | ||
620 | * handler or the actual handler as installed by the process itself). */ | ||
621 | #else | ||
622 | /* let's give the child process a chance to run execvp, 1s should | ||
623 | * be plenty in practice */ | ||
624 | if (pipe_stdout != NULL) | ||
625 | GNUNET_DISK_pipe_close_end (pipe_stdout, GNUNET_DISK_PIPE_END_WRITE); | ||
626 | if (pipe_stdin != NULL) | ||
627 | GNUNET_DISK_pipe_close_end (pipe_stdin, GNUNET_DISK_PIPE_END_READ); | ||
628 | sleep (1); | ||
629 | #endif | ||
630 | gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); | 610 | gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); |
631 | gnunet_proc->pid = ret; | 611 | gnunet_proc->pid = ret; |
632 | #if ENABLE_WINDOWS_WORKAROUNDS | 612 | #if ENABLE_WINDOWS_WORKAROUNDS |
@@ -906,11 +886,7 @@ GNUNET_OS_start_process_v (const int *lsocks, const char *filename, | |||
906 | GNUNET_array_append (lscp, ls, k); | 886 | GNUNET_array_append (lscp, ls, k); |
907 | GNUNET_array_append (lscp, ls, -1); | 887 | GNUNET_array_append (lscp, ls, -1); |
908 | } | 888 | } |
909 | #if HAVE_WORKING_VFORK | ||
910 | ret = vfork (); | ||
911 | #else | ||
912 | ret = fork (); | 889 | ret = fork (); |
913 | #endif | ||
914 | if (ret != 0) | 890 | if (ret != 0) |
915 | { | 891 | { |
916 | if (ret == -1) | 892 | if (ret == -1) |
@@ -922,17 +898,6 @@ GNUNET_OS_start_process_v (const int *lsocks, const char *filename, | |||
922 | } | 898 | } |
923 | else | 899 | else |
924 | { | 900 | { |
925 | #if HAVE_WORKING_VFORK | ||
926 | /* let's hope vfork actually works; for some extreme cases (including | ||
927 | * a testcase) we need 'execvp' to have run before we return, since | ||
928 | * we may send a signal to the process next and we don't want it | ||
929 | * to be caught by OUR signal handler (but either by the default | ||
930 | * handler or the actual handler as installed by the process itself). */ | ||
931 | #else | ||
932 | /* let's give the child process a chance to run execvp, 1s should | ||
933 | * be plenty in practice */ | ||
934 | sleep (1); | ||
935 | #endif | ||
936 | gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); | 901 | gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); |
937 | gnunet_proc->pid = ret; | 902 | gnunet_proc->pid = ret; |
938 | #if ENABLE_WINDOWS_WORKAROUNDS | 903 | #if ENABLE_WINDOWS_WORKAROUNDS |