nl_tokens: Kill a process having the particular command line pattern . This method tries to send SIGINT SIGTERM and SIGKILL to the matched processes in this order if the process is still running .
pl_tokens: async function killAppUsingPattern ( pgrepPattern ) { for ( const signal of [ 2 , 15 , 9 ] ) { if ( ! await getPidUsingPattern ( pgrepPattern ) ) { return ; } const args = [ ` ${ signal } ` , '-if' , pgrepPattern ] ; try { await exec ( 'pkill' , args ) ; } catch ( err ) { log . debug ( ` ${ args . join ( ' ' ) } ${ <mask> . message } ` ) ; } await B . delay ( 100 ) ; } }