On 1/11/24 10:55 AM, Chet Ramey wrote:
On 1/11/24 3:46 AM, Sam Kappen via Bug reports for the GNU Bourne Again SHell wrote:Thanks. I am using a Linux host with kernel version 4.x for cross building. It looks like autoconf is not defining the "PGRP_PIPE" macro variable as there is no check for linux kernel version 4.The uname check works, and the current version just sets it unconditionally for linux kernel versions that aren't 1 or 2. It's probably time so see why the BASH_SYS_PGRP_SYNC autoconf test isn't working, since the uname check isn't appropriate for cross-building.
There's nothing actually wrong with that test; the error Grisha sees is happening because the setpgid() is attempting to use a process group that really doesn't exist, not the zombie process pid that the test checks. Depending on how the timing goes, the wait for /usr/bin/true in the DEBUG trap command for the second pipeline element will reap the first pipeline process (the pgrp leader) before the second pipeline element has a chance to try and set its process group. The PGRP_PIPE define makes all the pipeline elements wait to execute until they've all been created and set their pgrp, so it prevents this from happening. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature