mirror of https://github.com/nodejs/node.git
21 lines
392 B
JavaScript
21 lines
392 B
JavaScript
'use strict';
|
|
|
|
const { Worker, isMainThread } = require('worker_threads')
|
|
|
|
// Tests that valid per-isolate/env NODE_OPTIONS are allowed and
|
|
// work in child workers.
|
|
if (isMainThread) {
|
|
new Worker(__filename, {
|
|
env: {
|
|
...process.env,
|
|
NODE_OPTIONS: '--trace-exit'
|
|
}
|
|
})
|
|
} else {
|
|
setImmediate(() => {
|
|
process.nextTick(() => {
|
|
process.exit(0);
|
|
});
|
|
});
|
|
}
|