Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

killpg(2) [bsd man page]

KILLPG(2)							System Calls Manual							 KILLPG(2)

NAME
killpg - send signal to a process group SYNOPSIS
killpg(pgrp, sig) int pgrp, sig; DESCRIPTION
Killpg sends the signal sig to the process group pgrp. See sigvec(2) for a list of signals. 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. RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global variable errno is set to indi- cate the error. ERRORS
Killpg will fail and no signal will be sent if any of the following occur: [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. SEE ALSO
kill(2), getpgrp(2), sigvec(2) 4th Berkeley Distribution May 14, 1986 KILLPG(2)

Check Out this Related Man Page

KILLPG(2)						      BSD System Calls Manual							 KILLPG(2)

NAME
killpg -- send signal to a process group LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int killpg(pid_t pgrp, int sig); DESCRIPTION
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 and members of the process group must have the same effective user ID, or the sender must be the super-user. As a single special case the continue signal SIGCONT may be sent to any process with the same session ID as the caller. RETURN VALUES
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 error. ERRORS
The killpg() function will fail and no signal will be sent if: [EINVAL] The sig argument is not a valid signal number. [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. [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. LEGACY SYNOPSIS
#include <sys/types.h> #include <signal.h> The include file <sys/types.h> is necessary. SEE ALSO
getpgrp(2), kill(2), sigaction(2), compat(5) HISTORY
The killpg() function appeared in 4.0BSD. BSD
October 10, 2006 BSD
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sig test

Just testing my sig.. if it doesnt work need some more help.. (2 Replies)
Discussion started by: Voodoo Child
2 Replies

2. Programming

signal in process communication

signal in process communication: I 'm a example in sun_unix that signal in process communication It's here down but I only have freebsd in my machine. how can i do the same in freebsd eg: #include <stdio.h> #include <signal.h> #include <unistd.h> int main( void ){ void... (2 Replies)
Discussion started by: a9711
2 Replies

3. UNIX for Dummies Questions & Answers

Sending Emails to a unix process

Hi , I need to have a unix process which is setup to read all incoming mail for some user and process the same. How tough it is to code the same.Is there any way that we can download some shell scripts for the same from some internet site Kindly help. (2 Replies)
Discussion started by: xsriniva
2 Replies

4. UNIX for Dummies Questions & Answers

sending mail via smtp

Hi Gururs, I have a process on a middelware (SAP XI) that is runnung on HP-UX. This Process is creating a flatfile. Now I want to call a script within the process that sends the created flatfile as attachment via Mail using a smpt-server. The script should have the following input parameters:... (2 Replies)
Discussion started by: elko.hasse
2 Replies

5. Programming

allowing members of a group to kill a process

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)
Discussion started by: vastcharade
1 Replies

6. UNIX for Dummies Questions & Answers

To identify process

i want a command to display all the process running for partical user and in all process i want to see only particular process details.. pls suggest comand like ps -ef (1 Reply)
Discussion started by: Babu154
1 Replies

7. Programming

1 process should co-ordinate another 10

hi to everyone reading, I have an assignment, I should make a process that should start a second process, and reseiving a signal from it to create a third process and close the second one... and the other things i will do on myself :) Do you have an Idea ?:confused: (2 Replies)
Discussion started by: stenlyto
2 Replies

8. AIX

Mailx Not sending

How can I check to see how/why my mailx program is not sending? /var has enough room. -Thanks ---------- Post updated at 08:48 AM ---------- Previous update was at 08:35 AM ---------- I tested the mailx to send with this command: echo "This is going to be body of the mail" |mailx... (1 Reply)
Discussion started by: tfort73
1 Replies

9. Solaris

Identify process sending ldap requests to old DNS server

Hi, I have a Solaris 10 system, which appears to be sending out LDAP queries to a server that is due to be decomissioned. Is there a way to identify which process is sending out these queries? The problem is that the local port constantly changes, and the connections do not stay open long... (3 Replies)
Discussion started by: badoshi
3 Replies