Search code examples
node.jsasynchronouschild-processsynchronousspawn

Node.js: Synchronous child_process spawn


Looking for the easiest way to synchronously spawn a child_process.

Sort of surprised I can't find anything.

I don't have a lot of experience with promises, async/await so I don't really have any existing code

Thanks in advance


Solution

  • Found the synchronous spawn counterpart here:

    https://nodejs.org/docs/v5.0.0/api/child_process.html#child_process_synchronous_process_creation