Skip to content

Commit

Permalink
Add kill() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Jan 16, 2022
1 parent 5f54045 commit fe083c4
Show file tree
Hide file tree
Showing 4 changed files with 1,595 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/node_modules/
/.idea/
/dist/
package-lock.json
yarn.lock
1 change: 1 addition & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export class ProcessPromise extends Promise {
}

async kill(signal = 'SIGTERM') {
this.catch(_ => _)
let children = await psTree(this.child.pid)
for (const p of children) {
try {
Expand Down
Loading

0 comments on commit fe083c4

Please sign in to comment.