sdbus++-gendir: ensure errors exit with error code
sdbus++-gendir: ensure errors exit with error code

If 'wait' is called without a pid, it waits for all existing
jobs to exit but does not reproduce the return code of the waited-on
jobs.  This means that if an error occurs in the sdbus++ processing
this script would still return a good return code.

Create a 'waitall' function that waits for pending jobs one at a time
so that any error code is correctly caught and replicated to the caller
of this script.

Signed-off-by: Patrick Williams <cbb7353e6d953ef360baf960c122346276c6e320@stwcx.xyz>
Change-Id: Ic7745752fd5bdde2b924a7509ea64464af73fdd7

openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus