From: Michael Adam Date: Wed, 1 Aug 2012 13:42:49 +0000 (+0200) Subject: s3: add a debug message for failed execv in sys_popen() X-Git-Tag: samba-4.0.0beta7~135 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c35bdb34da91504a6ed2abe5355aebcab8b73181;p=thirdparty%2Fsamba.git s3: add a debug message for failed execv in sys_popen() Signed-off-by: Stefan Metzmacher --- diff --git a/source3/lib/system.c b/source3/lib/system.c index 270d0f52f4b..2881fd664a7 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1159,6 +1159,7 @@ int sys_popen(const char *command) int pipe_fds[2]; popen_list *entry = NULL; char **argl = NULL; + int ret; if (pipe(pipe_fds) < 0) return -1; @@ -1213,7 +1214,11 @@ int sys_popen(const char *command) for (p = popen_chain; p; p = p->next) close(p->fd); - execv(argl[0], argl); + ret = execv(argl[0], argl); + if (ret == -1) { + DEBUG(0, ("sys_popen: ERROR executing dfree command " + "'%s': %s\n", command, strerror(errno))); + } _exit (127); }