vsftpd/vsftpd-2.0.2-signal.patch
2005-03-14 08:25:28 +00:00

42 lines
1.6 KiB
Diff

--- vsftpd-2.0.2/standalone.c.signal 2004-07-02 13:25:37.000000000 +0200
+++ vsftpd-2.0.2/standalone.c 2005-03-14 09:37:12.937643960 +0100
@@ -134,12 +134,8 @@
void* p_raw_addr;
int new_child;
int new_client_sock;
- vsf_sysutil_unblock_sig(kVSFSysUtilSigCHLD);
- vsf_sysutil_unblock_sig(kVSFSysUtilSigHUP);
new_client_sock = vsf_sysutil_accept_timeout(
listen_sock, p_accept_addr, 0);
- vsf_sysutil_block_sig(kVSFSysUtilSigCHLD);
- vsf_sysutil_block_sig(kVSFSysUtilSigHUP);
if (vsf_sysutil_retval_is_error(new_client_sock))
{
continue;
--- vsftpd-2.0.2/sysutil.c.signal 2005-03-03 00:48:02.000000000 +0100
+++ vsftpd-2.0.2/sysutil.c 2005-03-14 09:41:34.992805520 +0100
@@ -1623,7 +1623,11 @@
timeout.tv_usec = 0;
do
{
+ vsf_sysutil_unblock_sig(kVSFSysUtilSigCHLD);
+ vsf_sysutil_unblock_sig(kVSFSysUtilSigHUP);
retval = select(fd + 1, &accept_fdset, NULL, NULL, &timeout);
+ vsf_sysutil_block_sig(kVSFSysUtilSigCHLD);
+ vsf_sysutil_block_sig(kVSFSysUtilSigHUP);
saved_errno = errno;
vsf_sysutil_check_pending_actions(kVSFSysUtilUnknown, 0, 0);
} while (retval < 0 && saved_errno == EINTR);
@@ -1633,7 +1637,11 @@
return -1;
}
}
+ vsf_sysutil_unblock_sig(kVSFSysUtilSigCHLD);
+ vsf_sysutil_unblock_sig(kVSFSysUtilSigHUP);
retval = accept(fd, &remote_addr.u.u_sockaddr, &socklen);
+ vsf_sysutil_block_sig(kVSFSysUtilSigCHLD);
+ vsf_sysutil_block_sig(kVSFSysUtilSigHUP);
vsf_sysutil_check_pending_actions(kVSFSysUtilUnknown, 0, 0);
if (retval < 0)
{