mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

Some checks are pending
Coverage Linux (without intl) / coverage-linux-without-intl (push) Waiting to run
Coverage Linux / coverage-linux (push) Waiting to run
Coverage Windows / coverage-windows (push) Waiting to run
Test and upload documentation to artifacts / build-docs (push) Waiting to run
Linters / lint-addon-docs (push) Waiting to run
Linters / lint-cpp (push) Waiting to run
Linters / format-cpp (push) Waiting to run
Linters / lint-js-and-md (push) Waiting to run
Linters / lint-py (push) Waiting to run
Linters / lint-yaml (push) Waiting to run
Linters / lint-sh (push) Waiting to run
Linters / lint-codeowners (push) Waiting to run
Linters / lint-pr-url (push) Waiting to run
Linters / lint-readme (push) Waiting to run
Notify on Push / Notify on Force Push on `main` (push) Waiting to run
Notify on Push / Notify on Push on `main` that lacks metadata (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Fixes: https://github.com/nodejs/node/issues/55834 PR-URL: https://github.com/nodejs/node/pull/56106 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
25 lines
629 B
JavaScript
25 lines
629 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const child_process = require('child_process');
|
|
|
|
// Regression test for https://github.com/nodejs/node/issues/55834
|
|
const msgLen = 65521;
|
|
let cnt = 10;
|
|
|
|
if (process.argv[2] === 'child') {
|
|
const msg = Buffer.allocUnsafe(msgLen);
|
|
(function send() {
|
|
if (cnt--) {
|
|
process.send(msg, send);
|
|
} else {
|
|
process.disconnect();
|
|
}
|
|
})();
|
|
} else {
|
|
const child = child_process.spawn(process.execPath, [__filename, 'child'], {
|
|
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
|
|
serialization: 'advanced'
|
|
});
|
|
child.on('message', common.mustCall(cnt));
|
|
}
|