kill() is supposed to return ESRCH instead of B_BAD_THREAD_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18527 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
@@ -15,6 +15,9 @@ kill(pid_t pid, int sig)
|
|||||||
{
|
{
|
||||||
status_t status = send_signal(pid, (uint)sig);
|
status_t status = send_signal(pid, (uint)sig);
|
||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
|
if (status == B_BAD_THREAD_ID)
|
||||||
|
status = ESRCH;
|
||||||
|
|
||||||
errno = status;
|
errno = status;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user