aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index cfa20a773..b0ba21bb6 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -187,6 +187,7 @@ struct globals {
187 unsigned nearest_rotate; 187 unsigned nearest_rotate;
188 188
189 void* (*memRchr)(const void *, int, size_t); 189 void* (*memRchr)(const void *, int, size_t);
190 char *shell;
190 191
191 smallint exitasap; 192 smallint exitasap;
192 smallint rotateasap; 193 smallint rotateasap;
@@ -382,6 +383,9 @@ static void processorstart(struct logdir *ld)
382 /* vfork'ed child trashes this byte, save... */ 383 /* vfork'ed child trashes this byte, save... */
383 sv_ch = ld->fnsave[26]; 384 sv_ch = ld->fnsave[26];
384 385
386 if (!G.shell)
387 G.shell = xstrdup(get_shell_name());
388
385 while ((pid = vfork()) == -1) 389 while ((pid = vfork()) == -1)
386 pause2cannot("vfork for processor", ld->name); 390 pause2cannot("vfork for processor", ld->name);
387 if (!pid) { 391 if (!pid) {
@@ -416,8 +420,7 @@ static void processorstart(struct logdir *ld)
416 fd = xopen("newstate", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT); 420 fd = xopen("newstate", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT);
417 xmove_fd(fd, 5); 421 xmove_fd(fd, 5);
418 422
419// getenv("SHELL")? 423 execl(G.shell, G.shell, "-c", ld->processor, (char*) NULL);
420 execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", ld->processor, (char*) NULL);
421 bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", ld->name); 424 bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", ld->name);
422 } 425 }
423 ld->fnsave[26] = sv_ch; /* ...restore */ 426 ld->fnsave[26] = sv_ch; /* ...restore */