# HG changeset patch # User Mike Becker # Date 1750432518 -7200 # Node ID 1c80ba4a0d6259ef290e842d0e9e794e33d13f66 # Parent e9edc3bd0301fb62fca90e275c3a0fb30a4815a8 fix wrong return value of process::exec() diff -r e9edc3bd0301 -r 1c80ba4a0d62 src/process.cpp --- a/src/process.cpp Mon May 19 16:05:58 2025 +0200 +++ b/src/process.cpp Fri Jun 20 17:15:18 2025 +0200 @@ -108,8 +108,11 @@ // wait for the process to completely finish int status = -1; waitpid(pid, &status, 0); - - return status; + if (WIFEXITED(status)) { + return WEXITSTATUS(status); + } else { + return -1; + } } else { perror("fork"); return -1;