diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-09 13:07:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-09 13:07:05 +0000 |
commit | 3294db5f81273f90b1296ef999450f80b962fecb (patch) | |
tree | 5f892d39e72e924f0fca0f851c47cb9bc085b8bd /src/util/os_priority.c | |
parent | 4a9480a97bb883848ecf5e98367b1f0a576797aa (diff) | |
download | gnunet-3294db5f81273f90b1296ef999450f80b962fecb.tar.gz gnunet-3294db5f81273f90b1296ef999450f80b962fecb.zip |
-eliminate LISTEN_PID check, silly idea anyway, better to just unset the LISTEN_FDS after use; also this is needed to make things work with gdb/valgrind/monkey/etc.
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r-- | src/util/os_priority.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index f25c3dec5..c5bb397c1 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -510,7 +510,6 @@ start_process (int pipe_control, | |||
510 | { | 510 | { |
511 | #ifndef MINGW | 511 | #ifndef MINGW |
512 | pid_t ret; | 512 | pid_t ret; |
513 | char lpid[16]; | ||
514 | char fds[16]; | 513 | char fds[16]; |
515 | struct GNUNET_OS_Process *gnunet_proc; | 514 | struct GNUNET_OS_Process *gnunet_proc; |
516 | struct GNUNET_DISK_FileHandle *childpipe_read; | 515 | struct GNUNET_DISK_FileHandle *childpipe_read; |
@@ -615,7 +614,7 @@ start_process (int pipe_control, | |||
615 | if (0 != ret) | 614 | if (0 != ret) |
616 | { | 615 | { |
617 | unsetenv (GNUNET_OS_CONTROL_PIPE); | 616 | unsetenv (GNUNET_OS_CONTROL_PIPE); |
618 | gnunet_proc = GNUNET_malloc (sizeof (struct GNUNET_OS_Process)); | 617 | gnunet_proc = GNUNET_new (struct GNUNET_OS_Process); |
619 | gnunet_proc->pid = ret; | 618 | gnunet_proc->pid = ret; |
620 | gnunet_proc->control_pipe = childpipe_write; | 619 | gnunet_proc->control_pipe = childpipe_write; |
621 | if (GNUNET_YES == pipe_control) | 620 | if (GNUNET_YES == pipe_control) |
@@ -669,8 +668,6 @@ start_process (int pipe_control, | |||
669 | if (NULL != lscp) | 668 | if (NULL != lscp) |
670 | { | 669 | { |
671 | /* read systemd documentation... */ | 670 | /* read systemd documentation... */ |
672 | GNUNET_snprintf (lpid, sizeof (lpid), "%u", getpid ()); | ||
673 | setenv ("LISTEN_PID", lpid, 1); | ||
674 | i = 0; | 671 | i = 0; |
675 | tgt = 3; | 672 | tgt = 3; |
676 | while (-1 != lscp[i]) | 673 | while (-1 != lscp[i]) |