From 556440fbe435fee96348ca56e44c015149e5f7da Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 12 Feb 2015 07:40:50 +0100 Subject: [PATCH] sbr/execprog.c: Fix the return value Use pidXwait(), which invokes pidstatus(), here for error reporting. This eases the use of execprog() because we don't have to call it there everytime. However, it might be unwanted to put the error printing stuff into execprog() because we might have an invokation of execprog() that want's to deal with errors itself in a different way. If this would be the case, then we likely should change pidXwait() to pidwait() and call pidstatus(execprog()). --- sbr/execprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbr/execprog.c b/sbr/execprog.c index 9cc8879..ce38307 100644 --- a/sbr/execprog.c +++ b/sbr/execprog.c @@ -27,7 +27,7 @@ execprog(char *cmd, char **arg) default: /* parent */ - return (pidwait(pid, -1) & 0377 ? 1 : 0); + return pidXwait(pid, cmd); } return 1; /* NOT REACHED */ -- 1.7.10.4