blob: c237131993ab52835f27ec76a87a4875fe9d1235 [file] [log] [blame]
Denys Vlasenko840a4352017-07-07 22:56:02 +02001# In bash, "wait $!" extracts correct exitcode even if bg task has already exited
2# It prints 0, then 3:
3(sleep 0; exit 3) & sleep 1
4echo $?
5wait $!
6echo $?