Patch by Vasilis Kaoutsis: Implemented killpg().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22697 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -150,6 +150,7 @@ sighandler_t signal(int sig, sighandler_t signalHandler);
|
||||
int raise(int sig);
|
||||
int kill(pid_t pid, int sig);
|
||||
int send_signal(pid_t tid, unsigned int sig);
|
||||
int killpg(pid_t processGroupID, int sig);
|
||||
|
||||
int sigaction(int sig, const struct sigaction *act, struct sigaction *oact);
|
||||
int sigprocmask(int how, const sigset_t *set, sigset_t *oset);
|
||||
|
||||
@@ -4,6 +4,7 @@ UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ;
|
||||
|
||||
MergeObject posix_signal.o :
|
||||
kill.c
|
||||
killpg.cpp
|
||||
raise.c
|
||||
send_signal.c
|
||||
set_signal_stack.c
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2007, Vasilis Kaoutsis, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
int
|
||||
killpg(pid_t processGroupID, int signal)
|
||||
{
|
||||
if (processGroupID > 1)
|
||||
return kill(-processGroupID, signal);
|
||||
else {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user