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:
Axel Dörfler
2006-08-17 19:59:44 +00:00
parent 3b46e73c2b
commit d024bdc9e6
+6 -3
View File
@@ -1,7 +1,7 @@
/*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
* Copyright 2004-2006, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <OS.h>
@@ -15,6 +15,9 @@ kill(pid_t pid, int sig)
{
status_t status = send_signal(pid, (uint)sig);
if (status < B_OK) {
if (status == B_BAD_THREAD_ID)
status = ESRCH;
errno = status;
return -1;
}