projects
/
platform
/
upstream
/
nodejs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
process: allow changing `exitCode` in `on('exit')`
[platform/upstream/nodejs.git]
/
src
/
node.cc
diff --git
a/src/node.cc
b/src/node.cc
index
0b61076
..
434682f
100644
(file)
--- a/
src/node.cc
+++ b/
src/node.cc
@@
-3385,7
+3385,9
@@
int EmitExit(Environment* env) {
};
MakeCallback(env, process_object, "emit", ARRAY_SIZE(args), args);
- return code;
+
+ // Reload exit code, it may be changed by `emit('exit')`
+ return process_object->Get(exitCode)->IntegerValue();
}