From d024bdc9e67c265590eed93c3a61b6dc46cb87b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 17 Aug 2006 19:59:44 +0000 Subject: [PATCH] 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 --- src/system/libroot/posix/signal/kill.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/system/libroot/posix/signal/kill.c b/src/system/libroot/posix/signal/kill.c index 7932e0c2cb..78e0abbd41 100644 --- a/src/system/libroot/posix/signal/kill.c +++ b/src/system/libroot/posix/signal/kill.c @@ -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 @@ -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; }