import { ctrlc } from 'ctrlc-windows' ; import { Process } from '../src/exec' ; const isWin32 = global . process . platform === 'win32' ; export function terminate ( process ) { if ( isWin32 ) { ctrlc ( process . pid ) ; process . stdin . send ( "Y\n" ) ; } else { global . process . kill ( process . pid , 'SIGTERM' ) ; } } export function interrupt ( process ) { if ( isWin32 ) { ctrlc ( process . pid ) ; process . stdin . send ( "Y\n" ) ; } else { global . process . kill ( process . pid , 'SIGINT' ) ; } }