title: Return non-zero exit status if a child processes fails
body: <p>I have a docker build script which builds a series of libraries and runs test suits. In order to make my build script run faster on a many core server, I changed put the sequential order of commands (being passed to <code>RUN</code> to a bash invocation of several parallel commands:</p>
  
  <pre><code>RUN /bin/bash -c -e '\
      cmd1 arg1 &amp; \
      cmd2 &amp; \
      cmd3 arg1 arg2=foo arg3 &amp; \
      wait'
  </code></pre>
  
  <p>This worked file when there was no error. Then I realized even if one of child processes return a non-zero exit status, the whole bash command returns <code>0</code> and docker continues to build... How can I make the bash call to return <code>0</code> iff all its children return <code>0</code> ? </p>