aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-10-29 12:07:34 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-10-29 12:07:34 +0000
commitcf696850f3a41d6c4ac449e1f7c03e30c46fc2f4 (patch)
treeb19616a3a85485652b7f8a1beaa0a077052fb2f3
parent6a2c2cf6f3b4f03e18a0118f62f1ebc762ad35a3 (diff)
downloadbusybox-w32-cf696850f3a41d6c4ac449e1f7c03e30c46fc2f4.tar.gz
busybox-w32-cf696850f3a41d6c4ac449e1f7c03e30c46fc2f4.tar.bz2
busybox-w32-cf696850f3a41d6c4ac449e1f7c03e30c46fc2f4.zip
runsvdir: kill another global
-rw-r--r--runit/runsvdir.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index e7f8d5ac9..d5e58e9e7 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -58,7 +58,6 @@ struct globals {
58 struct pollfd pfd[1]; 58 struct pollfd pfd[1];
59 unsigned stamplog; 59 unsigned stamplog;
60#endif 60#endif
61 smallint set_pgrp;
62}; 61};
63#define G (*(struct globals*)&bb_common_bufsiz1) 62#define G (*(struct globals*)&bb_common_bufsiz1)
64#define sv (G.sv ) 63#define sv (G.sv )
@@ -69,7 +68,6 @@ struct globals {
69#define logpipe (G.logpipe ) 68#define logpipe (G.logpipe )
70#define pfd (G.pfd ) 69#define pfd (G.pfd )
71#define stamplog (G.stamplog ) 70#define stamplog (G.stamplog )
72#define set_pgrp (G.set_pgrp )
73#define INIT_G() do { \ 71#define INIT_G() do { \
74} while (0) 72} while (0)
75 73
@@ -109,7 +107,7 @@ static NOINLINE pid_t runsv(const char *name)
109 } 107 }
110 if (pid == 0) { 108 if (pid == 0) {
111 /* child */ 109 /* child */
112 if (set_pgrp) 110 if (option_mask32) /* -P option? */
113 setsid(); 111 setsid();
114/* man execv: 112/* man execv:
115 * "Signals set to be caught by the calling process image 113 * "Signals set to be caught by the calling process image
@@ -229,7 +227,7 @@ int runsvdir_main(int argc UNUSED_PARAM, char **argv)
229 INIT_G(); 227 INIT_G();
230 228
231 opt_complementary = "-1"; 229 opt_complementary = "-1";
232 set_pgrp = getopt32(argv, "P"); 230 getopt32(argv, "P");
233 argv += optind; 231 argv += optind;
234 232
235 bb_signals(0 233 bb_signals(0