diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/crond.c | 4 | ||||
-rw-r--r-- | miscutils/dc.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c index bd7a177e0..732fbb147 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -779,6 +779,8 @@ ForkJob(const char *user, CronLine *line, int mailFd, | |||
779 | xmove_fd(mailFd, mail_filename ? 1 : 0); | 779 | xmove_fd(mailFd, mail_filename ? 1 : 0); |
780 | dup2(1, 2); | 780 | dup2(1, 2); |
781 | } | 781 | } |
782 | /* crond 3.0pl1-100 puts tasks in separate process groups */ | ||
783 | bb_setpgrp(); | ||
782 | execlp(prog, prog, cmd, arg, NULL); | 784 | execlp(prog, prog, cmd, arg, NULL); |
783 | crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg); | 785 | crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg); |
784 | if (mail_filename) { | 786 | if (mail_filename) { |
@@ -914,6 +916,8 @@ static void RunJob(const char *user, CronLine *line) | |||
914 | if (DebugOpt) { | 916 | if (DebugOpt) { |
915 | crondlog(LVL5 "child running %s", DEFAULT_SHELL); | 917 | crondlog(LVL5 "child running %s", DEFAULT_SHELL); |
916 | } | 918 | } |
919 | /* crond 3.0pl1-100 puts tasks in separate process groups */ | ||
920 | bb_setpgrp(); | ||
917 | execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL); | 921 | execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL); |
918 | crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, | 922 | crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, |
919 | DEFAULT_SHELL, "-c", line->cl_Shell); | 923 | DEFAULT_SHELL, "-c", line->cl_Shell); |
diff --git a/miscutils/dc.c b/miscutils/dc.c index 6d4efa943..ff2bc3bce 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -19,7 +19,9 @@ enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof( | |||
19 | #define pointer (G.pointer ) | 19 | #define pointer (G.pointer ) |
20 | #define base (G.base ) | 20 | #define base (G.base ) |
21 | #define stack (G.stack ) | 21 | #define stack (G.stack ) |
22 | #define INIT_G() do { } while (0) | 22 | #define INIT_G() do { \ |
23 | base = 10; \ | ||
24 | } while (0) | ||
23 | 25 | ||
24 | 26 | ||
25 | static void push(double a) | 27 | static void push(double a) |