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>
This commit is contained in:
Søren Schmidt 1998-12-21 19:21:36 +00:00
parent 082004e119
commit c26abb753a
2 changed files with 4 additions and 4 deletions

View File

@ -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];

View File

@ -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];