From nobody  Mon Dec 14 15:39:37 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id PAA01250;
          Mon, 14 Dec 1998 15:39:37 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199812142339.PAA01250@hub.freebsd.org>
Date: Mon, 14 Dec 1998 15:39:37 -0800 (PST)
From: marcel@scc.nl
To: freebsd-gnats-submit@freebsd.org
Subject: linux emulator: linux_kill syscall: EINVAL on signal 0
X-Send-Pr-Version: www-1.0

>Number:         9082
>Category:       i386
>Synopsis:       linux emulator: linux_kill syscall: EINVAL on signal 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 14 15:40:00 PST 1998
>Closed-Date:    Mon Dec 21 11:22:05 PST 1998
>Last-Modified:  Mon Dec 21 11:25:56 PST 1998
>Originator:     Marcel Moolenaar
>Release:        -current
>Organization:
SCC vof
>Environment:
FreeBSD scones.sup.scc.nl 3.0-CURRENT FreeBSD 3.0-CURRENT #6: Mon Dec 14 22:52:55 CET 1998     marcel@scones.sup.scc.nl:/usr/src/sys/compile/SCONES  i386

>Description:
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.

>How-To-Repeat:
n/a
>Fix:
--- linux_signal.c.orig Tue Dec 15 00:36:31 1998
+++ linux_signal.c      Tue Dec 15 00:36:14 1998
@@ -310,7 +310,7 @@
     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];

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Dec 21 11:22:05 PST 1998 
State-Changed-Why:  
Patch committed. 


Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: sos 
Responsible-Changed-When: Mon Dec 21 11:22:05 PST 1998 
Responsible-Changed-Why:  
I'm the linuxulator guy :) 
>Unformatted:
