A process is not terminated even if a script is completed
makenowjust opened this issue · 0 comments
makenowjust commented
What is the problem?
The following script is to check a simple regexp. It prints a safe
result, but it is not terminated after the printing.
const { check } = require('recheck');
(async () => {
console.log((await check('a', '')).status);
})();
How to fix the problem?
The reason of this bug is that calling subprocess.unref
is missing.
We should count running checks and it calls unref
correctly when all checks are done.