mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: https://github.com/nodejs/node/pull/65967 Fixes: https://github.com/nodejs/node/issues/65100 Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
18 lines
463 B
JavaScript
18 lines
463 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const process = require('process');
|
|
const assert = require('assert');
|
|
const { fork } = require('child_process');
|
|
const binding = require(`./build/${common.buildType}/concurrent_calls`);
|
|
|
|
if (process.argv[2] === 'child') {
|
|
binding();
|
|
setTimeout(() => {}, 100);
|
|
} else {
|
|
const child = fork(__filename, ['child']);
|
|
child.on('close', common.mustCall((code) => {
|
|
assert.strictEqual(code, 0);
|
|
}));
|
|
}
|