Skip to content

Commit 26b0141

Browse files
committed
Signal handling: Always exit non-zero
The default signal handler always exits non-zero so the signal listener installed by threads.js should too.
1 parent 0b0f6c9 commit 26b0141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/master/implementation.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface Terminable {
3333
// Terminates the workers, empties the workers array, and exits.
3434
const onSignal = (workers: Terminable[], signal: string) => {
3535
Promise.all(workers.map(worker => worker.terminate())).then(
36-
() => process.exit(0),
36+
() => process.exit(1),
3737
() => process.exit(1),
3838
)
3939
workers.length = 0

0 commit comments

Comments
 (0)