K 10 svn:author V 6 jilles K 8 svn:date V 27 2014-03-20T22:38:13.270487Z K 7 svn:log V 276 sh: Don't overwrite old exit status if a PID is reused. Only store exit status for a process if that process has not terminated yet. Test (slow): exit 7 & p1=$!; until exit 8 & p2=$!; [ "$p1" = "$p2" ]; do wait "$p2"; done; sleep 0.1; wait %1; echo $? should write "7". END