aboutsummaryrefslogtreecommitdiff
path: root/runit/runsvdir.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 22:21:52 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 22:21:52 +0000
commit8c7839512039212ba88e48d856d0ac9835fdec67 (patch)
tree4aa5cb8737ab74799096cb8560180890aa2bb5d7 /runit/runsvdir.c
parente06bed30cfcde7b9e320aff8a4c878c72416c4c4 (diff)
downloadbusybox-w32-8c7839512039212ba88e48d856d0ac9835fdec67.tar.gz
busybox-w32-8c7839512039212ba88e48d856d0ac9835fdec67.tar.bz2
busybox-w32-8c7839512039212ba88e48d856d0ac9835fdec67.zip
runit cleanup part 1
Diffstat (limited to 'runit/runsvdir.c')
-rw-r--r--runit/runsvdir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index 3290da5e6..41581a8c8 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -70,8 +70,8 @@ static void runsv(int no, char *name)
70 prog[0] = "runsv"; 70 prog[0] = "runsv";
71 prog[1] = name; 71 prog[1] = name;
72 prog[2] = 0; 72 prog[2] = 0;
73 sig_uncatch(sig_hangup); 73 sig_uncatch(SIGHUP);
74 sig_uncatch(sig_term); 74 sig_uncatch(SIGTERM);
75 if (pgrp) setsid(); 75 if (pgrp) setsid();
76 execvp(prog[0], prog); 76 execvp(prog[0], prog);
77 //pathexec_run(*prog, prog, (char* const*)environ); 77 //pathexec_run(*prog, prog, (char* const*)environ);
@@ -197,8 +197,8 @@ int runsvdir_main(int argc, char **argv)
197 if (!argv || !*argv) usage(); 197 if (!argv || !*argv) usage();
198 } 198 }
199 199
200 sig_catch(sig_term, s_term); 200 sig_catch(SIGTERM, s_term);
201 sig_catch(sig_hangup, s_hangup); 201 sig_catch(SIGHUP, s_hangup);
202 svdir = *argv++; 202 svdir = *argv++;
203 if (argv && *argv) { 203 if (argv && *argv) {
204 rplog = *argv; 204 rplog = *argv;
@@ -276,12 +276,12 @@ int runsvdir_main(int argc, char **argv)
276 taia_uint(&deadline, check ? 1 : 5); 276 taia_uint(&deadline, check ? 1 : 5);
277 taia_add(&deadline, &now, &deadline); 277 taia_add(&deadline, &now, &deadline);
278 278
279 sig_block(sig_child); 279 sig_block(SIGCHLD);
280 if (rplog) 280 if (rplog)
281 iopause(io, 1, &deadline, &now); 281 iopause(io, 1, &deadline, &now);
282 else 282 else
283 iopause(0, 0, &deadline, &now); 283 iopause(0, 0, &deadline, &now);
284 sig_unblock(sig_child); 284 sig_unblock(SIGCHLD);
285 285
286 if (rplog && (io[0].revents | IOPAUSE_READ)) 286 if (rplog && (io[0].revents | IOPAUSE_READ))
287 while (read(logpipe[0], &ch, 1) > 0) 287 while (read(logpipe[0], &ch, 1) > 0)