3 ms·
My understanding is that it's "don't call system.exit() until you have finished writing everything to system.stdout".
by simonbw 2y ago
My understanding is that it's "don't call system.exit() until you have finished writing everything to system.stdout".
- gcommer 2y agoEven better: never use process.exit(). Set process.exitCode instead. https://nodejs.org/api/process.html#processexitcode https://nodejs.org/api/process.html#processexitcode
- o11c 2y agoOr just throw an error. See also `process.on('exit', ...)`; you can conditionally set process.exitCode in it (only if there was no other failure) if you want.