[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is kill 0 to be used to terminate the current script
From: |
Greg Wooledge |
Subject: |
Re: is kill 0 to be used to terminate the current script |
Date: |
Tue, 21 Mar 2023 07:57:52 -0400 |
On Tue, Mar 21, 2023 at 08:16:22AM +0100, alex xmb ratchev wrote:
> .. i just cant remember ..
> ( non interactive )
> like in trap int , kill 0 , and in exit trap some code more
> .. ?
DESCRIPTION
The kill() system call can be used to send any signal to any process
group or process.
If pid is positive, then signal sig is sent to the process with the ID
specified by pid.
If pid equals 0, then sig is sent to every process in the process group
of the calling process.
If pid equals -1, then sig is sent to every process for which the call‐
ing process has permission to send signals, except for process 1
(init), but see below.
If pid is less than -1, then sig is sent to every process in the
process group whose ID is -pid.