diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
commit | 63036a6f3380652c0cb54627bdeabcd212fa2f8c (patch) | |
tree | 90194f23cb1e6ca483e7773233c326a9b705f85f /source3/lib/sock_exec.c | |
parent | d41d580c600e3228ff8fee5c16c47580f661a240 (diff) | |
parent | 932c287a406048759fa1ac4bf86e29d96991ded1 (diff) | |
download | samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.gz samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.bz2 samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3482cd9b0e81bbc801f1cec33fca82fc45a3ddef)
Diffstat (limited to 'source3/lib/sock_exec.c')
-rw-r--r-- | source3/lib/sock_exec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/lib/sock_exec.c b/source3/lib/sock_exec.c index 203d7e93b3..278a174663 100644 --- a/source3/lib/sock_exec.c +++ b/source3/lib/sock_exec.c @@ -105,8 +105,12 @@ int sock_exec(const char *prog) close(fd[0]); close(0); close(1); - dup(fd[1]); - dup(fd[1]); + if (dup(fd[1]) == -1) { + exit(1); + } + if (dup(fd[1]) == -1) { + exit(1); + } exit(system(prog)); } close(fd[1]); |