-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
testIssues and PRs related to the tests.Issues and PRs related to the tests.
Description
In test https://github.com/nodejs/node/blob/master/test/sequential/test-net-GH-5504.js
var opt = {
env: {
NODE_DEBUG: 'net',
NODE_COMMON_PORT: process.env.NODE_COMMON_PORT,
}
};
...
var s = spawn(node, [__filename, 'server'], opt);This code loses the original environment variables passing into the program, which causes failure for the spawn function. Specifically, the program could not start because the loader couldn't find the correct version of standard c++ library which is not in the default location. The loader is supposed to find the needed libraries thought LD_LIBRARY_PATH environment variable which is missing.
I suggests to change the above code to this instead:
var opt = {
env: process.env
};
opt.env.NODE_DEBUG = "net";
opt.env.NODE_COMMON_PORT = process.env.NODE_COMMON_PORT;Metadata
Metadata
Assignees
Labels
testIssues and PRs related to the tests.Issues and PRs related to the tests.