1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

runcmd: use tevent_re_initialise() to close sockets

this ensures that all event fds are closed in the child
This commit is contained in:
Andrew Tridgell 2010-04-19 17:14:33 +10:00
parent 8208f8e5e5
commit dcf35ab487

View File

@ -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);