[talk] Concisely determining exit codes of background jobs
Ipsen S Ripsbusker
ipsens at ripsbusker.no.eu.org
Tue Feb 12 20:55:31 EST 2019
As a tangent to Ivan's talk, we discussed the merits of checking of exit
status (or other indicators of success) of parallel calls to scp.
If I recall correctly, Ivan started multiple background scp processes
with &, and then he waited for them to complete with the following
command, which always exits 0.
The following command waits for the same background processes, and
it still exits 0 if all processes exited 0. It differs in that it
exits 1 if any process exited with something other than 0.
wait `jobs -p`
Note that these are of course the standard wait(1) and jobs(1),
which are usually builtins in sh(1).
More information about the talk