Mercurial > masqmail
comparison src/child.c @ 262:fc1c6425c024
s/EXIT_SUCCESS/0/ && s/EXIT_FAILURE/1/
The constants are all to bulky.
We should have different, meaningful exit codes anyway.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 02 Dec 2010 17:11:25 -0300 |
parents | 98cda87105a7 |
children | b27f66555ba8 |
comparison
equal
deleted
inserted
replaced
261:0afe18a9ee03 | 262:fc1c6425c024 |
---|---|
52 { | 52 { |
53 char *argv[] = { "/bin/sh", "-c", (char *) command, NULL }; | 53 char *argv[] = { "/bin/sh", "-c", (char *) command, NULL }; |
54 execve(*argv, argv, NULL); | 54 execve(*argv, argv, NULL); |
55 } | 55 } |
56 logwrite(LOG_ALERT, "execve failed: %s\n", strerror(errno)); | 56 logwrite(LOG_ALERT, "execve failed: %s\n", strerror(errno)); |
57 _exit(EXIT_FAILURE); | 57 _exit(1); |
58 } else if (pid == -1) { | 58 } else if (pid == -1) { |
59 return -1; | 59 return -1; |
60 } else { | 60 } else { |
61 close(pipe[0]); | 61 close(pipe[0]); |
62 return pipe[1]; | 62 return pipe[1]; |