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:
parent
3b46e73c2b
commit
d024bdc9e6
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user