subprocess.js
This file
Path
test/fixtures/subprocess.js
9 lines · 293 bytes · JavaScript
Last changed by
Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343
History of this fileTake it
Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343
lines 1–9why, one step back1#!/usr/bin/env node2import process from 'node:process';3import {execa} from '../../index.js';45const cleanup = process.argv[2] === 'true';6const detached = process.argv[3] === 'true';7const subprocess = execa('forever.js', {cleanup, detached});8process.send(subprocess.pid);9await subprocess;