diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-03 01:47:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-03 01:47:56 +0000 |
commit | 0aa84906936bd99ea8627a24b8ad2fdeedc7e928 (patch) | |
tree | af2d6fa3dabfb8b7aafd8ca7a33ddc872da1758c | |
parent | 64392905ef3f17db48e0e16e6d0b232f95e301a7 (diff) | |
download | busybox-0aa84906936bd99ea8627a24b8ad2fdeedc7e928.tar.gz |
sigset_t blocked_sigset is too big for static (128 bytes)
-rw-r--r-- | runit/svlogd.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c index f0e9aaf6f..0f17eec7b 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c @@ -54,7 +54,7 @@ static smallint tmaxflag; static char repl; static const char *replace = ""; -sigset_t blocked_sigset; +static sigset_t *blocked_sigset; static iopause_fd input; static int fl_flag_0; @@ -646,9 +646,9 @@ static int buffer_pread(int fd, char *s, unsigned len, struct taia *now) } while (1) { - sigprocmask(SIG_UNBLOCK, &blocked_sigset, NULL); + sigprocmask(SIG_UNBLOCK, blocked_sigset, NULL); iopause(&input, 1, &trotate, now); - sigprocmask(SIG_BLOCK, &blocked_sigset, NULL); + sigprocmask(SIG_BLOCK, blocked_sigset, NULL); i = ndelay_read(fd, s, len); if (i >= 0) break; if (errno != EAGAIN) { @@ -748,6 +748,7 @@ static void logmatch(struct logdir *ld) int svlogd_main(int argc, char **argv) { + sigset_t ss; char *r,*l,*b; ssize_t stdin_cnt = 0; int i; @@ -801,12 +802,13 @@ int svlogd_main(int argc, char **argv) * with the same stdin */ fl_flag_0 = fcntl(0, F_GETFL, 0); - sigemptyset(&blocked_sigset); - sigaddset(&blocked_sigset, SIGTERM); - sigaddset(&blocked_sigset, SIGCHLD); - sigaddset(&blocked_sigset, SIGALRM); - sigaddset(&blocked_sigset, SIGHUP); - sigprocmask(SIG_BLOCK, &blocked_sigset, NULL); + blocked_sigset = &ss; + sigemptyset(&ss); + sigaddset(&ss, SIGTERM); + sigaddset(&ss, SIGCHLD); + sigaddset(&ss, SIGALRM); + sigaddset(&ss, SIGHUP); + sigprocmask(SIG_BLOCK, &ss, NULL); sig_catch(SIGTERM, sig_term_handler); sig_catch(SIGCHLD, sig_child_handler); sig_catch(SIGALRM, sig_alarm_handler); |