diff options
author | Wayne Davison <wayned@samba.org> | 2006-02-20 17:17:51 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-02-20 17:17:51 +0000 |
commit | d749eb6896029099c08cda39e738a87468f76ffc (patch) | |
tree | ec69dde97cf4eae35c7c916edae5c0c03dea7b33 /clientserver.c | |
parent | 6d59ac192b6df345ab04035ea3bc6751c3537307 (diff) | |
download | android_external_rsync-d749eb6896029099c08cda39e738a87468f76ffc.tar.gz android_external_rsync-d749eb6896029099c08cda39e738a87468f76ffc.tar.bz2 android_external_rsync-d749eb6896029099c08cda39e738a87468f76ffc.zip |
When starting up a transfer, substitute the remember_children()
SIGCHLD handler in place of the minimal one that socket.c enabled.
Diffstat (limited to 'clientserver.c')
-rw-r--r-- | clientserver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clientserver.c b/clientserver.c index 3b53958f..eb644560 100644 --- a/clientserver.c +++ b/clientserver.c @@ -63,6 +63,10 @@ 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; +#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(). @@ -796,6 +800,11 @@ int start_daemon(int f_in, int f_out) return -1; } +#ifdef HAVE_SIGACTION + sigact.sa_flags = SA_NOCLDSTOP; +#endif + SIGACTION(SIGCHLD, remember_children); + return rsync_module(f_in, f_out, i); } |