aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>1998-12-21 19:21:36 +0000
committerSøren Schmidt <sos@FreeBSD.org>1998-12-21 19:21:36 +0000
commitc26abb753a92ecb1c0363d4393b7433acbcdec80 (patch)
tree4b4a94abc36955bacaf7bbeff74525e0e4239fb9 /sys
parent082004e119cf3be145a15faf410f3622ed9af407 (diff)
downloadsrc-c26abb753a92ecb1c0363d4393b7433acbcdec80.tar.gz
src-c26abb753a92ecb1c0363d4393b7433acbcdec80.zip
Kill(pid, 0) normally returns 0 on both FreeBSD and Redhat after having
performed all sorts of sanity checks. The FreeBSD linux emulator returns EINVAL in such a case. Allowing signal 0 to be passed to kill will result in compatible behaviour. PR: 9082 Submitted by: Marcel Moolenaar <marcel@scc.nl>
Notes
Notes: svn path=/head/; revision=41986
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_signal.c4
-rw-r--r--sys/i386/linux/linux_signal.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 481ed7f17753..1f71bf53df09 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_signal.c,v 1.12 1998/08/15 22:29:43 bde Exp $
+ * $Id: linux_signal.c,v 1.13 1998/10/11 04:54:16 jdp Exp $
*/
#include <sys/param.h>
@@ -310,7 +310,7 @@ linux_kill(struct proc *p, struct linux_kill_args *args)
printf("Linux-emul(%d): kill(%d, %d)\n",
p->p_pid, args->pid, args->signum);
#endif
- if (args->signum <= 0 || args->signum >= LINUX_NSIG)
+ if (args->signum < 0 || args->signum >= LINUX_NSIG)
return EINVAL;
tmp.pid = args->pid;
tmp.signum = linux_to_bsd_signal[args->signum];
diff --git a/sys/i386/linux/linux_signal.c b/sys/i386/linux/linux_signal.c
index 481ed7f17753..1f71bf53df09 100644
--- a/sys/i386/linux/linux_signal.c
+++ b/sys/i386/linux/linux_signal.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_signal.c,v 1.12 1998/08/15 22:29:43 bde Exp $
+ * $Id: linux_signal.c,v 1.13 1998/10/11 04:54:16 jdp Exp $
*/
#include <sys/param.h>
@@ -310,7 +310,7 @@ linux_kill(struct proc *p, struct linux_kill_args *args)
printf("Linux-emul(%d): kill(%d, %d)\n",
p->p_pid, args->pid, args->signum);
#endif
- if (args->signum <= 0 || args->signum >= LINUX_NSIG)
+ if (args->signum < 0 || args->signum >= LINUX_NSIG)
return EINVAL;
tmp.pid = args->pid;
tmp.signum = linux_to_bsd_signal[args->signum];