| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $ */ | | 1 | /* $NetBSD: kern_sig.c,v 1.394 2020/10/30 22:19:00 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran. | | 8 | * by Andrew Doran. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -60,27 +60,27 @@ | | | @@ -60,27 +60,27 @@ |
60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
63 | * SUCH DAMAGE. | | 63 | * SUCH DAMAGE. |
64 | * | | 64 | * |
65 | * @(#)kern_sig.c 8.14 (Berkeley) 5/14/95 | | 65 | * @(#)kern_sig.c 8.14 (Berkeley) 5/14/95 |
66 | */ | | 66 | */ |
67 | | | 67 | |
68 | /* | | 68 | /* |
69 | * Signal subsystem. | | 69 | * Signal subsystem. |
70 | */ | | 70 | */ |
71 | | | 71 | |
72 | #include <sys/cdefs.h> | | 72 | #include <sys/cdefs.h> |
73 | __KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $"); | | 73 | __KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.394 2020/10/30 22:19:00 christos Exp $"); |
74 | | | 74 | |
75 | #include "opt_execfmt.h" | | 75 | #include "opt_execfmt.h" |
76 | #include "opt_ptrace.h" | | 76 | #include "opt_ptrace.h" |
77 | #include "opt_dtrace.h" | | 77 | #include "opt_dtrace.h" |
78 | #include "opt_compat_sunos.h" | | 78 | #include "opt_compat_sunos.h" |
79 | #include "opt_compat_netbsd.h" | | 79 | #include "opt_compat_netbsd.h" |
80 | #include "opt_compat_netbsd32.h" | | 80 | #include "opt_compat_netbsd32.h" |
81 | #include "opt_pax.h" | | 81 | #include "opt_pax.h" |
82 | | | 82 | |
83 | #define SIGPROP /* include signal properties table */ | | 83 | #define SIGPROP /* include signal properties table */ |
84 | #include <sys/param.h> | | 84 | #include <sys/param.h> |
85 | #include <sys/signalvar.h> | | 85 | #include <sys/signalvar.h> |
86 | #include <sys/proc.h> | | 86 | #include <sys/proc.h> |
| @@ -2672,18 +2672,18 @@ static int | | | @@ -2672,18 +2672,18 @@ static int |
2672 | filt_signal(struct knote *kn, long hint) | | 2672 | filt_signal(struct knote *kn, long hint) |
2673 | { | | 2673 | { |
2674 | | | 2674 | |
2675 | if (hint & NOTE_SIGNAL) { | | 2675 | if (hint & NOTE_SIGNAL) { |
2676 | hint &= ~NOTE_SIGNAL; | | 2676 | hint &= ~NOTE_SIGNAL; |
2677 | | | 2677 | |
2678 | if (kn->kn_id == hint) | | 2678 | if (kn->kn_id == hint) |
2679 | kn->kn_data++; | | 2679 | kn->kn_data++; |
2680 | } | | 2680 | } |
2681 | return (kn->kn_data != 0); | | 2681 | return (kn->kn_data != 0); |
2682 | } | | 2682 | } |
2683 | | | 2683 | |
2684 | const struct filterops sig_filtops = { | | 2684 | const struct filterops sig_filtops = { |
2685 | .f_isfd = 0, | | 2685 | .f_isfd = 0, |
2686 | .f_attach = filt_sigattach, | | 2686 | .f_attach = filt_sigattach, |
2687 | .f_detach = filt_sigdetach, | | 2687 | .f_detach = filt_sigdetach, |
2688 | .f_event = filt_signal, | | 2688 | .f_event = filt_signal, |
2689 | }; | | 2689 | }; |