Reputation: 1968
I'm using codeceptjs
with shelljs
.
In one of tests I'm invoking a Go application like this:
const shell = require('shelljs')
let execution = shell.exec('./myGoApplication')
execution.kill();
I tried to stop it with kill
with different params but it is not working.
Does anyone knows how to stop Go application from running?
EDIT:
This code doesn't stop either
execution.kill('SIGINT');
https://github.com/shelljs/shelljs
Upvotes: -1
Views: 558
Reputation: 23798
The kill
command accepts the termination signal as its first argument.
let execution = shell.exec('./myGoApplication')
execution.kill('SIGINT');
Here is a list of all signals:
https://unix.stackexchange.com/a/317496
Upvotes: 1