With a build of bash 4.3 patchlevel 42 on a Linux x86_64 system I am getting warning messages on stderr when running a certain script like: "wait_for: no record of process 8278" . Running bash with the script as input under strace shows that process 8277 does a successful wait4(-1,...) which DOES return pid 8278 . So why is bash complaining it has no record of it ? Is bash getting its book-keeping wrong here? The script is not using any background jobs with '&' or using the 'wait' built-in. It is simply doing something like: <quote><pre> shopt -s lastpipe; set -o pipefail; function f() { some_executable "$@" | { while read line; do { ... ; } done; } return 0; } ... f $args | { while read result; do ...; done ; } </pre></quote>
So I'd expect the initial bash process to run a subshell bash to invoke the f() function, which runs a command child that execve-s "some_executable', parsing its output and writing to the subshell bash on a pipe, which writes to the parent bash on a pipe, which parses it & does whatever. Without the lastpipe option, this would be the other way round - the parent would run f, and its output would be parsed in the subshell running the f output parsing loop. All this seems to work OK, but why the warning message about "no record of process X"? Or is this message indicating something has gone seriously wrong ? Thanks in advance for any replies, Regards, Jason