I thought the value was only 0 if the fork/spawn was succesful. i.e. if it fails for lack of resources or something it's non zero.
or have I miss understood it's significance? From: Chet Ramey Sent: Samstag, 14. Dezember 2013 05:05 To: Martin Kealey Reply To: chet.ra...@case.edu Cc: bug-bash@gnu.org; b...@packages.debian.org; chet.ra...@case.edu Subject: Re: inconsistent $? after & On 12/12/13, 7:00 PM, Martin Kealey wrote: > Bash Version: 4.2 > Patch Level: 25 > Release Status: release > > Description: > The value of $? after starting a backgrounded command is > inconsistent: > $? is unchanged after starting a sufficiently complex command, but > after starting a simpler command it is set to 0. Thanks for the report. The exit status of any asynchronous command is 0. I will fix this for bash-4.3-release. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/