klibc-bot for Denys Vlasenko
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] trap: Globally rename pendingsigs to pending_sig
Commit-ID: dbb7e738b59fe626fd25c4df9f348fecc434ce09 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=dbb7e738b59fe626fd25c4df9f348fecc434ce09 Author: Denys Vlasenko <dvlasenk at redhat.com> AuthorDate: Wed, 26 Oct 2016 19:28:29 +0200 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] trap: Globally rename pendingsigs to pending_sig This variable does not contain "sigs" (plural). It contains either 0 or (one) signal number of a pending signal. For someone unfamiliar with this code, "pendingsigs" name is confusing - it hints at being an array or bit mask of pending singnals. Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com> CC: dash at vger.kernel.org Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/jobs.c | 4 ++-- usr/dash/miscbltin.c | 2 +- usr/dash/trap.c | 10 +++++----- usr/dash/trap.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 5e080f6a..a2602bae 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -647,7 +647,7 @@ out: return retval; sigout: - retval = 128 + pendingsigs; + retval = 128 + pending_sig; goto out; } @@ -1146,7 +1146,7 @@ waitproc(int block, int *status) sigfillset(&mask); sigprocmask(SIG_SETMASK, &mask, &oldmask); - while (!gotsigchld && !pendingsigs) + while (!gotsigchld && !pending_sig) sigsuspend(&oldmask); sigclearmask(); diff --git a/usr/dash/miscbltin.c b/usr/dash/miscbltin.c index c47fdbf8..fc14dc4b 100644 --- a/usr/dash/miscbltin.c +++ b/usr/dash/miscbltin.c @@ -207,7 +207,7 @@ readcmd(int argc, char **argv) case 1: break; default: - if (errno == EINTR && !pendingsigs) + if (errno == EINTR && !pending_sig) continue; /* fall through */ case 0: diff --git a/usr/dash/trap.c b/usr/dash/trap.c index 89ceff4f..a3aeb33e 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -74,7 +74,7 @@ char sigmode[NSIG - 1]; /* indicates specified signal received */ static char gotsig[NSIG - 1]; /* last pending signal */ -volatile sig_atomic_t pendingsigs; +volatile sig_atomic_t pending_sig; /* received SIGCHLD */ int gotsigchld; @@ -290,7 +290,7 @@ onsig(int signo) } gotsig[signo - 1] = 1; - pendingsigs = signo; + pending_sig = signo; if (signo == SIGINT && !trap[SIGINT]) { if (!suppressint) @@ -313,7 +313,7 @@ void dotrap(void) int i; int status, last_status; - if (!pendingsigs) + if (!pending_sig) return; status = savestatus; @@ -322,7 +322,7 @@ void dotrap(void) status = exitstatus; savestatus = status; } - pendingsigs = 0; + pending_sig = 0; barrier(); for (i = 0, q = gotsig; i < NSIG - 1; i++, q++) { @@ -330,7 +330,7 @@ void dotrap(void) continue; if (evalskip) { - pendingsigs = i + 1; + pending_sig = i + 1; break; } diff --git a/usr/dash/trap.h b/usr/dash/trap.h index 6590be12..a095b0e1 100644 --- a/usr/dash/trap.h +++ b/usr/dash/trap.h @@ -38,7 +38,7 @@ extern int trapcnt; extern char sigmode[]; -extern volatile sig_atomic_t pendingsigs; +extern volatile sig_atomic_t pending_sig; extern int gotsigchld; int trapcmd(int, char **);
Seemingly Similar Threads
- [klibc:update-dash] dash: trap: Globally rename pendingsigs to pending_sig
- [klibc:update-dash] [TRAP] Make sure evalskip is zero before running traps
- [klibc:update-dash] dash: [TRAP] Make sure evalskip is zero before running traps
- [klibc:update-dash] dash: eval: Add vfork support
- [klibc:update-dash] trap: Implement POSIX.1-2008 trap reset behaviour