summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-09-04 15:17:37 +0200
committerMichael Adam <obnox@samba.org>2012-09-04 20:39:20 +0200
commitd43c411fb19707f1b57177e9a3300573018cc849 (patch)
tree1f168a0842ce917e05eaf50bda5d6870e433ecc4
parent243157ae345f32b06f9c1a223139891339d0ad82 (diff)
downloadsamba-d43c411fb19707f1b57177e9a3300573018cc849.tar.gz
samba-d43c411fb19707f1b57177e9a3300573018cc849.tar.xz
samba-d43c411fb19707f1b57177e9a3300573018cc849.zip
s3: in sys_popen(), improve call to pipe and report error to debug
-rw-r--r--source3/lib/system.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index ce55e83d58..30f2ac6d00 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1166,8 +1166,12 @@ int sys_popen(const char *command)
return -1;
}
- if (pipe(pipe_fds) < 0)
+ ret = pipe(pipe_fds);
+ if (ret < 0) {
+ DEBUG(0, ("sys_popen: error opening pipe: %s\n",
+ strerror(errno)));
return -1;
+ }
parent_end = pipe_fds[0];
child_end = pipe_fds[1];