aboutsummaryrefslogtreecommitdiffstats
path: root/clientserver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2010-06-19 10:49:43 -0700
committerWayne Davison <wayned@samba.org>2010-06-19 10:50:28 -0700
commitce571e64b6c4ab2947c05a21ebc254729933ea0c (patch)
treed3d501c9235996a8ed6fac58032b8a0039eae426 /clientserver.c
parent9541770faf6cdb2851a39fa5feaa067a6e0d751a (diff)
downloadandroid_external_rsync-ce571e64b6c4ab2947c05a21ebc254729933ea0c.tar.gz
android_external_rsync-ce571e64b6c4ab2947c05a21ebc254729933ea0c.tar.bz2
android_external_rsync-ce571e64b6c4ab2947c05a21ebc254729933ea0c.zip
Close the socket fds in the "post-xfer exec" process.
Diffstat (limited to 'clientserver.c')
-rw-r--r--clientserver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clientserver.c b/clientserver.c
index 878254f3..469371f9 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -686,6 +686,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return -1;
}
if (pid) {
+ close(f_in);
+ if (f_out != f_in)
+ close(f_out);
set_env_num("RSYNC_PID", (long)pid);
if (wait_process(pid, &status, 0) < 0)
status = -1;