summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-08-01 15:42:49 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-17 20:07:07 +0200
commitc35bdb34da91504a6ed2abe5355aebcab8b73181 (patch)
tree97c3acd720e94830206c38a8dd9621cf92850488
parent471a853e343e336adb14a219fba2d2ead9a1db62 (diff)
downloadsamba-c35bdb34da91504a6ed2abe5355aebcab8b73181.tar.gz
samba-c35bdb34da91504a6ed2abe5355aebcab8b73181.tar.bz2
samba-c35bdb34da91504a6ed2abe5355aebcab8b73181.zip
s3: add a debug message for failed execv in sys_popen()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/lib/system.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 270d0f52f4..2881fd664a 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);
}