xref: /third_party/node/test/parallel/test-child-process-fork-url.mjs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ciimport { mustCall } from '../common/index.mjs';
21cb0ef41Sopenharmony_ciimport { fork } from 'child_process';
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ciif (process.argv[2] === 'child') {
51cb0ef41Sopenharmony_ci  process.disconnect();
61cb0ef41Sopenharmony_ci} else {
71cb0ef41Sopenharmony_ci  const child = fork(new URL(import.meta.url), ['child']);
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci  child.on('disconnect', mustCall());
101cb0ef41Sopenharmony_ci  child.once('exit', mustCall());
111cb0ef41Sopenharmony_ci}
12

Indexes created Thu Nov 07 10:32:03 CST 2024