Open cpcallen opened 6 years ago
+1, I am also wondering if I have multiple async cleanup handlers that need to call uninstall, will they both run? Or do I need to warp the uninstall calls in a setImmediate
to at least give everything the chance to run once.
I'll have a look at this over the weekend. Thanks for bringing this to my attention.
A small observation: if cleanup handers were installed using
process.once
instead ofprocess.on
it would be unnecessary to calluninstall
before callingprocess.kill
.(Unfortunately
uninstall
is part of the public API of the package and might actually be useful to some dependents so probably can't be removed even though it would be otherwise unnecessary.)