ipc-disconnect.js
This file
Path
test/fixtures/ipc-disconnect.js
12 lines · 281 bytes · JavaScript
Last changed by
Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
History of this fileTake it
Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
lines 1–12why, one step back1#!/usr/bin/env node2import process from 'node:process';3import {once} from 'node:events';4import * as execaExports from '../../index.js';56const methodName = process.argv[2];78if (process.channel !== null) {9 await once(process, 'disconnect');10}1112await execaExports[methodName]();