Skip to content

proc

import { waitProcess } from 'sysopkit/op/proc';

Waits for a process to start or stop:

// Wait for nginx to start
await waitProcess({ name: 'nginx', state: 'running', delay: 1000 });
// Wait for nginx to stop
await waitProcess({ name: 'nginx', state: 'stopped', delay: 500 });