Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When starting up a transfer, substitute the remember_children()
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
27ace48
..
eb64456
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-58,10
+58,15
@@
int read_only = 0;
int daemon_log_format_has_i = 0;
int daemon_log_format_has_o_or_i = 0;
int module_id = -1;
int daemon_log_format_has_i = 0;
int daemon_log_format_has_o_or_i = 0;
int module_id = -1;
+struct chmod_mode_struct *daemon_chmod_modes;
/* Length of lp_path() string when in daemon mode & not chrooted, else 0. */
unsigned int module_dirlen = 0;
/* Length of lp_path() string when in daemon mode & not chrooted, else 0. */
unsigned int module_dirlen = 0;
+#ifdef HAVE_SIGACTION
+static struct sigaction sigact;
+#endif
+
/**
* Run a client connected to an rsyncd. The alternative to this
* function for remote-shell connections is do_cmd().
/**
* Run a client connected to an rsyncd. The alternative to this
* function for remote-shell connections is do_cmd().
@@
-685,12
+690,11
@@
static int rsync_module(int f_in, int f_out, int i)
if (lp_timeout(i) && lp_timeout(i) > io_timeout)
set_io_timeout(lp_timeout(i));
if (lp_timeout(i) && lp_timeout(i) > io_timeout)
set_io_timeout(lp_timeout(i));
-
if (am_sender)
p = lp_outgoing_chmod(i);
else
p = lp_incoming_chmod(i);
if (am_sender)
p = lp_outgoing_chmod(i);
else
p = lp_incoming_chmod(i);
- if (*p && !
parse_chmod(p, &chmod_modes
)) {
+ if (*p && !
(daemon_chmod_modes = parse_chmod(p, &chmod_modes)
)) {
rprintf(FLOG, "Invalid \"%sing chmod\" directive: %s\n",
am_sender ? "outgo" : "incom", p);
}
rprintf(FLOG, "Invalid \"%sing chmod\" directive: %s\n",
am_sender ? "outgo" : "incom", p);
}
@@
-796,6
+800,11
@@
int start_daemon(int f_in, int f_out)
return -1;
}
return -1;
}
+#ifdef HAVE_SIGACTION
+ sigact.sa_flags = SA_NOCLDSTOP;
+#endif
+ SIGACTION(SIGCHLD, remember_children);
+
return rsync_module(f_in, f_out, i);
}
return rsync_module(f_in, f_out, i);
}