Skip to content

Commit

Permalink
Close the socket fds in the "post-xfer exec" process.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Jun 19, 2010
1 parent 9541770 commit ce571e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clientserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce571e6

Please sign in to comment.