diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 12:25:13 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 12:25:13 -0400 |
| commit | 71c98089bc7cddaae2eab41ab09e250c7a0a43ca (patch) | |
| tree | 01749897017908bde725a6b836495ac14697dad2 | |
| parent | b1a5a9f720a63541742fa887278923d857cfc814 (diff) | |
| download | stasis-71c98089bc7cddaae2eab41ab09e250c7a0a43ca.tar.gz | |
Error message on failed dup2
| -rw-r--r-- | src/lib/core/multiprocessing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c index db45c7b..06815a1 100644 --- a/src/lib/core/multiprocessing.c +++ b/src/lib/core/multiprocessing.c @@ -83,7 +83,9 @@ int child(struct MultiProcessingPool *pool, struct MultiProcessingTask *task) { return -1; } - if (dup2(STDOUT_FILENO, STDERR_FILENO) < 0) { + int fd = -1; + if ((fd = dup2(STDOUT_FILENO, STDERR_FILENO)) < 0) { + SYSERROR("%s", "Unable to redirect stderr to stdout"); fclose(fp_log); return -1; } |
