bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Kill sends signal to wrong process group with job control enabled


From: Chet Ramey
Subject: Re: Kill sends signal to wrong process group with job control enabled
Date: Mon, 2 Mar 2026 17:25:50 -0500
User-agent: Mozilla Thunderbird

On 3/1/26 4:38 AM, Martin D Kealey wrote:

This is the core error: $! records a PID, NOT a PGID or a SID. On some
systems (e.g. Linux) a PGID or SID is always numerically equal to the PID
of the leader process, on others (e.g. BSD) they are unequal.

This depends on the process (usually the shell) creating the process group
and assigning processes to it; it doesn't break down cleanly across systems
like that.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]