connecting to non-responding hosts: 1 hr timeout (fwd)

Gert Doering gert at greenie.muc.de
Thu May 3 05:47:51 EST 2001


Hi,

On Tue, May 01, 2001 at 08:37:38PM -0700, Carson Gaspar wrote:
[..]
> >> you just need to do fcntl(fd, F_SETFL, O_NONBLOCK) on the socket before
> >> the connect(), check for EINPROGRESS from the connect(), and then do a
> >> select() for writability on the fd with a timeout of however long you

What's wrong with just alarm()ing out of the connect()?

(This will be bad for anything remotely multi-threaded but for the ssh
client, it should be fine).

gert

-- 
Gert Doering
Mobile communications ... right now writing from *@Bologna*
... mobile phone: +49 177 2160221 ... or mail me:  gert at greenie.muc.de



More information about the openssh-unix-dev mailing list