Sean Hefty [Sat, 11 Aug 2012 04:44:39 +0000 (21:44 -0700)]
rspreload: Do not block connect when supporting fork
Many FTP servers require fork support. However, FTP clients,
such as ncftp, will perform the following call sequence:
send PASV request to server over connection 1
server will listen for connection 2
issue nonblocking connect to server
send ACCEPT request to server over connection 1
server will accept connection 2
The current fork support converts all nonblocking connect
calls to blocking. The result is that the FTP client ends up
blocked waiting for the server to accept the connection,
which it will never do.
Fix this by deferring the fork connection handling until the
first socket call after connect.
Sean Hefty [Sat, 11 Aug 2012 04:44:39 +0000 (21:44 -0700)]
rspreload: Do not block connect when supporting fork
Many FTP servers require fork support. However, FTP clients,
such as ncftp, will perform the following call sequence:
send PASV request to server over connection 1
server will listen for connection 2
issue nonblocking connect to server
send ACCEPT request to server over connection 1
server will accept connection 2
The current fork support converts all nonblocking connect
calls to blocking. The result is that the FTP client ends up
blocked waiting for the server to accept the connection,
which it will never do.
Fix this by deferring the fork connection handling until the
first socket call after connect.
Sean Hefty [Sat, 11 Aug 2012 04:44:39 +0000 (21:44 -0700)]
rspreload: Do not block connect when supporting fork
Many FTP servers require fork support. However, FTP clients,
such as ncftp, will perform the following call sequence:
send PASV request to server over connection 1
server will listen for connection 2
issue nonblocking connect to server
send ACCEPT request to server over connection 1
server will accept connection 2
The current fork support converts all nonblocking connect
calls to blocking. The result is that the FTP client ends up
blocked waiting for the server to accept the connection,
which it will never do.
Fix this by deferring the fork connection handling until the
first socket call after connect.
Sean Hefty [Sat, 11 Aug 2012 04:44:39 +0000 (21:44 -0700)]
rspreload: Do not block connect when supporting fork
Many FTP servers require fork support. However, FTP clients,
such as ncftp, will perform the following call sequence:
send PASV request to server over connection 1
server will listen for connection 2
issue nonblocking connect to server
send ACCEPT request to server over connection 1
server will accept connection 2
The current fork support converts all nonblocking connect
calls to blocking. The result is that the FTP client ends up
blocked waiting for the server to accept the connection,
which it will never do.
Fix this by deferring the fork connection handling until the
first socket call after connect.
Sean Hefty [Sat, 11 Aug 2012 04:44:39 +0000 (21:44 -0700)]
rspreload: Do not block connect when supporting fork
Many FTP servers require fork support. However, FTP clients,
such as ncftp, will perform the following call sequence:
send PASV request to server over connection 1
server will listen for connection 2
issue nonblocking connect to server
send ACCEPT request to server over connection 1
server will accept connection 2
The current fork support converts all nonblocking connect
calls to blocking. The result is that the FTP client ends up
blocked waiting for the server to accept the connection,
which it will never do.
Fix this by deferring the fork connection handling until the
first socket call after connect.