diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-27 10:01:22 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-27 10:01:22 -0400 |
commit | d657705546d8a4758ec1c65ce13ae7d2f954bc95 (patch) | |
tree | 05f507477c5e776e0ca7abf10ceb5168f371ef2e | |
parent | b2cf2c2acbdda61a510b6cf36f07d14375163887 (diff) | |
download | stasis-d657705546d8a4758ec1c65ce13ae7d2f954bc95.tar.gz |
Terminate everything when forking fails
-rw-r--r-- | src/multiprocessing.c | 2 |
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); } } |