diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-11-24 10:28:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-11-24 10:28:56 +0000 |
commit | 0502a512b28c28bcba28e2b978262469807da1fd (patch) | |
tree | 27ff84b2f459bcd05d81e9390fc5d69be750ae34 /sys/kern/kern_sig.c | |
parent | 56b052090c4c910fd718a461775a5bfc5847b17a (diff) |
Minor code cleanup. Move a comment to the right place, move a function
to get a better order of functions. Also reduce the size of sigprop
to NSIG from NSIG+1. NSIG is defined as 33 and so includes the extra
element for this array.
OK mpi@
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8ec7e4bd18f..2e950404096 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.288 2021/11/12 17:57:13 cheloha Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.289 2021/11/24 10:28:55 claudio Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -82,7 +82,10 @@ const struct filterops sig_filtops = { .f_event = filt_signal, }; -const int sigprop[NSIG + 1] = { +/* + * The array below categorizes the signals and their default actions. + */ +const int sigprop[NSIG] = { 0, /* unused */ SA_KILL, /* SIGHUP */ SA_KILL, /* SIGINT */ @@ -209,6 +212,17 @@ signal_init(void) } /* + * Initialize a new sigaltstack structure. + */ +void +sigstkinit(struct sigaltstack *ss) +{ + ss->ss_flags = SS_DISABLE; + ss->ss_size = 0; + ss->ss_sp = NULL; +} + +/* * Create an initial sigacts structure, using the same signal state * as pr. */ @@ -223,17 +237,6 @@ sigactsinit(struct process *pr) } /* - * Initialize a new sigaltstack structure. - */ -void -sigstkinit(struct sigaltstack *ss) -{ - ss->ss_flags = SS_DISABLE; - ss->ss_size = 0; - ss->ss_sp = NULL; -} - -/* * Release a sigacts structure. */ void |