git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8208f8e
)
runcmd: use tevent_re_initialise() to close sockets
author
Andrew Tridgell
<tridge@samba.org>
Mon, 19 Apr 2010 07:14:33 +0000
(17:14 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 19 Apr 2010 08:21:42 +0000
(18:21 +1000)
this ensures that all event fds are closed in the child
lib/util/util_runcmd.c
patch
|
blob
|
history
diff --git
a/lib/util/util_runcmd.c
b/lib/util/util_runcmd.c
index 54643d3292c1979389b63a42fdea80a5a1384970..d81a0ace93981d871baf99e5b2ee8e31cb3ec1ff 100644
(file)
--- a/
lib/util/util_runcmd.c
+++ b/
lib/util/util_runcmd.c
@@
-160,6
+160,10
@@
struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
close(1);
close(2);
+ /* we want to ensure that all of the network sockets we had
+ open are closed */
+ tevent_re_initialise(ev);
+
/* setup for logging to go to the parents debug log */
open("/dev/null", O_RDONLY); /* for stdin */
dup2(p1[1], 1);