Copyright (c) 1980, 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the fol...
NAMEkillpg - send signal to a process group
SYNOPSISIn sys/types.h In signal.h Ft int Fn killpg pid_t pgrp int sig
DESCRIPTIONThe Fn killpg function sends the signal Fa sig to the process group Fa pgrp . See sigaction(2) for a list of signals. If Fa pgrp is 0, Fn killpg sends the signal to the sending process's process group.
The sending process must be able to Fn kill at least one process in the receiving process group.
RETURN VALUESRv -std killpg
ERRORSThe Fn killpg function will fail and no signal will be sent if:
- Bq Er EINVAL
- The Fa sig argument is not a valid signal number.
- Bq Er ESRCH
- No process can be found in the process group specified by Fa pgrp .
- Bq Er EPERM
- Fn kill returns EPERM for all processes in the process group.