summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Coe <bencoe@gmail.com>2019-01-23 09:44:43 -0800
committerBenjamin Coe <bencoe@gmail.com>2019-01-23 10:19:17 -0800
commita6286e64c517b14b28cf84325ea24eab52b4c45f (patch)
tree05a8d0ff35fc7b8ed8a8377e0a2803437ab6e7f6 /lib
parenta8d763adf20c2d8faaf5638a3e1b071a14af45dd (diff)
downloadandroid-node-v8-a6286e64c517b14b28cf84325ea24eab52b4c45f.tar.gz
android-node-v8-a6286e64c517b14b28cf84325ea24eab52b4c45f.tar.bz2
android-node-v8-a6286e64c517b14b28cf84325ea24eab52b4c45f.zip
process: fix call process.reallyExit, vs., binding
Some user-land modules, e.g., nyc, mocha, currently rely on patching process.reallyExit. PR-URL: https://github.com/nodejs/node/pull/25655 Fixes: https://github.com/nodejs/node/issues/25650 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/process/per_thread.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js
index 6d64c636b2..28b9afe1cf 100644
--- a/lib/internal/process/per_thread.js
+++ b/lib/internal/process/per_thread.js
@@ -149,7 +149,10 @@ function wrapProcessMethods(binding) {
process._exiting = true;
process.emit('exit', process.exitCode || 0);
}
- binding.reallyExit(process.exitCode || 0);
+ // FIXME(joyeecheung): This is an undocumented API that gets monkey-patched
+ // in the user land. Either document it, or deprecate it in favor of a
+ // better public alternative.
+ process.reallyExit(process.exitCode || 0);
}
function kill(pid, sig) {