aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-09-27 10:01:22 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-09-27 10:01:22 -0400
commitd657705546d8a4758ec1c65ce13ae7d2f954bc95 (patch)
tree05f507477c5e776e0ca7abf10ceb5168f371ef2e
parentb2cf2c2acbdda61a510b6cf36f07d14375163887 (diff)
downloadstasis-d657705546d8a4758ec1c65ce13ae7d2f954bc95.tar.gz
Terminate everything when forking fails
-rw-r--r--src/multiprocessing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multiprocessing.c b/src/multiprocessing.c
index 8677909..bd4678a 100644
--- a/src/multiprocessing.c
+++ b/src/multiprocessing.c
@@ -251,7 +251,7 @@ int mp_pool_join(struct MultiProcessingPool *pool, size_t jobs, size_t flags) {
if (slot->status == -1) {
if (mp_task_fork(pool, slot)) {
fprintf(stderr, "%s: mp_task_fork failed\n", slot->ident);
- exit(1);
+ kill(0, SIGTERM);
}
}