diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-19 17:14:33 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-19 18:21:42 +1000 |
commit | dcf35ab487f9213d4424493257903971ebe3ebbf (patch) | |
tree | fb16c728f271ec6adb3f7e962798ada0718c444a /lib | |
parent | 8208f8e5e53f59866949b6169bc107f8f17e7a0e (diff) | |
download | samba-dcf35ab487f9213d4424493257903971ebe3ebbf.tar.gz samba-dcf35ab487f9213d4424493257903971ebe3ebbf.tar.bz2 samba-dcf35ab487f9213d4424493257903971ebe3ebbf.zip |
runcmd: use tevent_re_initialise() to close sockets
this ensures that all event fds are closed in the child
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/util_runcmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c index 54643d3292..d81a0ace93 100644 --- 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); |