summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-01-28 19:01:10 +0000
committernjl <njl@FreeBSD.org>2004-01-28 19:01:10 +0000
commit8d164f018ebe5312b6a40e08483d4a9d1fcd3156 (patch)
tree9c43155da1a79306c409066cbffcbfbd3f8b3e1a /bin/sh/jobs.c
parentdb65d6a17c8bc08c56b292a98c96196008eeb3e1 (diff)
downloadFreeBSD-src-8d164f018ebe5312b6a40e08483d4a9d1fcd3156.zip
FreeBSD-src-8d164f018ebe5312b6a40e08483d4a9d1fcd3156.tar.gz
Use sys_nsig instead of NSIG for the length of the signal arrays. This
is important if we add new signals later. From DragonflyBSD: jobs.c:1.4, trap.c:1.3. Obtained from: DragonflyBSD
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r--bin/sh/jobs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 7c9cfa4..36b075c 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -362,7 +362,7 @@ showjob(struct job *jp, pid_t pid, int sformat, int lformat)
else
#endif
i = WTERMSIG(ps->status);
- if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F])
+ if ((i & 0x7F) < sys_nsig && sys_siglist[i & 0x7F])
scopy(sys_siglist[i & 0x7F], s);
else
fmtstr(s, 64, "Signal %d", i & 0x7F);
@@ -985,7 +985,7 @@ dowait(int block, struct job *job)
if (!mflag ||
(thisjob->foreground && !WIFSTOPPED(status))) {
i = WTERMSIG(status);
- if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F])
+ if ((i & 0x7F) < sys_nsig && sys_siglist[i & 0x7F])
out1str(sys_siglist[i & 0x7F]);
else
out1fmt("Signal %d", i & 0x7F);
OpenPOWER on IntegriCloud