The following test seems to indicate that "sem --wait" does not actually wait for all started jobs to be finished. Is that expected? If yes, how should one properly wait in that situation?
sem --jobs 3 --id my_id -u 'echo First started; sleep 9; echo The first finished' && sem --jobs 3 --id my_id -u 'echo Second started; sleep 7; echo The second finished' && sem --jobs 3 --id my_id -u 'echo Third started; sleep 5; echo The third finished' && sem --jobs 3 --id my_id -u 'echo Fourth started; sleep 3; echo The fourth finished' && sem --wait --id my_id echo "All finished." First started Second started Third started Fourth started All finished. The fourth finished The third finished The second finished The first finished Regards, Achim.