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

Chet Ramey <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
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    [email protected]    http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaaYObwUDAAAAAAAKCRC7WGnwZOp0qyzI
AJwJGQyA1XISkRtm5GGc8QFRnWFYKgCeJUDYnbC7ND6xJ9sjDIh+3ahG0jM=
=9LX3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.