diff options
author | Leah Neukirchen <leah@vuxu.org> | 2019-08-13 14:06:02 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-08-13 14:06:02 +0200 |
commit | 56928052f171018602538031d0b516483803042a (patch) | |
tree | 40ce9b0b8e3ba80e22abc9a9084b64f9f95cd5ed /reap.c | |
parent | 1682f2b487377bff9935e66d2b53239c34a55568 (diff) | |
download | reap-56928052f171018602538031d0b516483803042a.tar.gz reap-56928052f171018602538031d0b516483803042a.tar.xz reap-56928052f171018602538031d0b516483803042a.zip |
use unsigned chars for errno transport
Diffstat (limited to 'reap.c')
-rw-r--r-- | reap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/reap.c b/reap.c index 47b8428..7643d56 100644 --- a/reap.c +++ b/reap.c @@ -117,7 +117,7 @@ main(int argc, char *argv[]) { if (pid == 0) { // in child close(pipefd[0]); execvp(argv[optind], argv+optind); - char err = errno; + unsigned char err = errno; write(pipefd[1], &err, 1); _exit(111); } else if (pid < 0) { // fork failed @@ -127,7 +127,7 @@ main(int argc, char *argv[]) { close(pipefd[1]); - char err = 0; + unsigned char err = 0; int n = read(pipefd[0], &err, 1); if (n >= 0 && err) { |