Is ChildProcess running or dead? - node.js
<p>Is there any official (documented) way, given <a href="https://nodejs.org/api/child_process.html#child_process_class_childprocess" rel="nofollow"><code>ChildProcess</code></a> instance how to find out whether the process is still alive or dead?</p>

<p>I don't want to listen to <code>exit</code> event, I only want to synchronously obtain info whether the process has already terminated.</p>

<p>So far I found undocumented:</p>

<pre class="lang-javascript prettyprint-override"><code>const isAlive = process.exitCode === null;
</code></pre>