Skip to content
Discussion options

You must be logged in to vote

The file you dug up is the whole story, and the reason it blows up is a collision over file descriptor 3.

AVA copies the parent's node flags into every worker. normalizeNodeArguments ends with

return [...process.execArgv, ...fromConf, ...parsedArgv];

and that array is handed to fork(file, options, apiOptions.nodeArguments), which passes it as execArgv to each worker. So when 0x launches node with its -r .../redir-stdout.js preload, that preload does not stay in the process 0x is profiling — it gets inherited by every test worker AVA starts.

Now put that next to how the workers are created. With --no-worker-threads AVA takes this branch:

worker = childProcess.fork(fileURLToPath(workerPath), …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jcubic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants