Forked cluster does not fix up process.execArgv
after filename when executed by module.runMain()
#36948
Labels
cluster
Issues and PRs related to the cluster subsystem.
What steps will reproduce the bug?
See https://gist.github.com/JLHwung/631dfbf4a4c68d85ae7a9b7ab5fa9754 for
./wrapper.js
and./payload.js
.How often does it reproduce? Is there a required condition?
What is the expected behavior?
It should print
What do you see instead?
Additional information
Context: babel/babel#12635
process.execArgv
is["/path/to/babel-node.js", "--expose_gc"]
It seems that forked clusters stop fixing up
execArgv
after"/path/to/babel-node.js"
is read. If I place"/path/to/babel-node.js"
after"--expose_gc"
, it works as expected.As
module.runMain
is undocumented. The actual behaviour may be limbo. However as it is used by both Babel and npx, would you consider document it or deprecate it via better approach? 😄The text was updated successfully, but these errors were encountered: