title: Why is Node exiting with exit code 13, rather than hanging?
body: <p>A file <code>deadlock.mjs</code> with this in it:</p>
  <pre class="lang-js prettyprint-override"><code>await new Promise(function(resolve) {});
  </code></pre>
  <p>will run and immediately end giving an exit code of 13. I would've expected this program to hang forever.</p>
  <pre class="lang-js prettyprint-override"><code>await new Promise(function(resolve) {resolve()});
  </code></pre>
  <p>unsurprisingly ends immediately and gives a 0 exit code.</p>
  <p>Why doesn't the first program deadlock? And what is the significance of exit code 13?</p>