KILLPG(2) BSD System Calls Manual KILLPG(2)NAME
killpg -- send signal to a process group
Standard C Library (libc, -lc)
killpg(pid_t pgrp, int sig);
The killpg() function sends the signal sig to the process group pgrp. See sigaction(2) for a list of signals. If pgrp is 0, killpg() sends
the signal to the sending process's process group.
The sending process must be able to kill() at least one process in the receiving process group.
The killpg() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate
The killpg() function will fail and no signal will be sent if:
[EINVAL] The sig argument is not a valid signal number.
[ESRCH] No process can be found in the process group specified by pgrp.
[EPERM] kill() returns EPERM for all processes in the process group.
SEE ALSO getpgrp(2), kill(2), sigaction(2)HISTORY
The killpg() function appeared in 4.0BSD.
BSD March 15, 2012 BSD
Check Out this Related Man Page
KILLPG(2) Linux Programmer's Manual KILLPG(2)NAME
killpg - send signal to a process group
int killpg(int pgrp, int sig);
Killpg sends the signal sig to the process group pgrp. See sigaction(2) for a list of signals. If pgrp is 0, killpg sends the signal to
the sending process's process group.
The sending process and members of the process group must have the same effective user ID, or the sender must be the super-user. As a sin-
gle special case the continue signal SIGCONT may be sent to any process that is a descendant of the current process.
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
EINVAL Sig is not a valid signal number.
ESRCH No process can be found in the process group specified by pgrp.
ESRCH The process group was given as 0 but the sending process does not have a process group.
EPERM The sending process is not the super-user and one or more of the target processes has an effective user ID different from that of
the sending process.
SVr4, 4.4BSD (The killpg function call first appeared in 4.0BSD).
SEE ALSO kill(2), getpgrp(2), signal(2)BSD Man Page 1993-07-23 KILLPG(2)
I've written a python program where I want to allow members of a specific group the ability to kill it, and I'm not sure how to do it. I've been looking at the setuid() and setgid() and similar functions in the os module, but haven't been able to get them to work. I can't seem to change the uid or... (1 Reply)
I need something unusual, I guess. I need to start a process, and if that process displays a specific error message, I need to kill that process and restart it.
startprocess | grep -i "This is the specific error message" && kill $pidof(startprocess)
Explanation, I need... (4 Replies)
We want to create a script in order to filter process in the system with more than five days (STIME) and then kill them under Solaris 10.
How can we filter these kind of process ?
Thanks in advance for your help (4 Replies)
How can we clear the D state (orphaned) process? I have tried to kill it with kill -9 but not work.
The server is critical, so is there anyway to clear the D process without rebooting the server? (9 Replies)