Skip to content

Commit

Permalink
A better kill
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jul 6, 2024
1 parent a403135 commit d78a69c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/support/tcpdump.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export class TCPDump {
this.tcpdumpProcess = execa('sudo', parameters);
}
async stop() {
return execa('sudo', ['pkill', '-9', 'tcpdump'], { reject: false });
if (this.tcpdumpProcess) {
await this.tcpdumpProcess.kill('SIGINT');
this.tcpdumpProcess = undefined;
}
}

async mv(url, iteration) {
Expand Down

0 comments on commit d78a69c

Please sign in to comment.