title: How can I prevent the patch command from exiting a bash shell?
body: <p>I have a bash script that looks like this:</p>
  
  <pre><code>#!/bin/bash
  
  set -e
  
  function patchStuff {
    patch --unified --input=&lt;...&gt;.patch --strip=0 --forward --reject-file=&lt;...&gt;.patch.rej --verbose --dry-run
  }
  
  function doMoreThings {}
  
  patchStuff
  doMoreThings # never reached
  
  exit 0
  </code></pre>
  
  <p>It completes/exits right after the <code>patch</code> command completes. How can I prevent, stop or ignore that. I played with running the command in a subshell, but that didn't do the trick.</p>
  
  <blockquote>
    <p>bash -c "patch ..."</p>
  </blockquote>