/bin/sh (ash) incorrectly parse command lists if any (but not first) of list components marked as 'background', f.e construction { a; b; c & d; e; } parsed as if it was { { a; b; c; } & d; e; } All other shells which I can test parse this as { a; b; { c& } ; d; e; } (including /bin/sh in NetBSD-current which is originated from the same sources as FreeBSD one) Fix: Applay the patch. (Here is the result of How-To-Repeat: Try this one: #!/bin/sh while true do date +'1:%H:%M:%S' sleep 2 exit ps jx & date +'2:%H:%M:%S' sleep 3 exit done (while ... do ... done is here to force using command-list )
State Changed From-To: open->closed Suggested fix applied in rev 1.10 of sh/parser.c. This does also fix an earlier (non-GNATS) bug report by Ben Jackson under the subject ``bug in /bin/sh for loops''.