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:
parent
082004e119
commit
c26abb753a
@ -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];
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user