X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fexecprog.c;h=c10421d2ce4b306f7ba721106a89cc79d07ee68a;hp=ce38307798f1544ba8e0208d9f21e0b2af4f4863;hb=4112940aea5591648b03a81907408752c08b33aa;hpb=556440fbe435fee96348ca56e44c015149e5f7da diff --git a/sbr/execprog.c b/sbr/execprog.c index ce38307..c10421d 100644 --- a/sbr/execprog.c +++ b/sbr/execprog.c @@ -4,6 +4,9 @@ */ #include +#include +#include +#include int @@ -16,21 +19,21 @@ execprog(char *cmd, char **arg) case -1: /* fork error */ advise("fork", "unable to"); - return 1; + return -1; case 0: /* child */ execvp(cmd, arg); fprintf(stderr, "unable to exec "); perror(cmd); - _exit(-1); + _exit(EX_OSERR); default: /* parent */ return pidXwait(pid, cmd); } - return 1; /* NOT REACHED */ + return -1; /* NOT REACHED */ }