This problem's been reported before. If your OS says that an fd is
readable via select(), then the read() should not block.
As you observe though, the read is blocking so your OS is probably not
telling the truth when it returns from the select().
The archives have plenty of discussion
Setting an alarm is a nasty hack in my opinion, but I have to admit
that it's something I considered.
Well, the qmail-remote connection is well and truly wedged once it's
in this state and if the select() timed out as it's meant to,
qmail-remote would exit with a delivery failure
I've been running qmail on a number of platforms quite happily for a
while - until now I've had no problems at all. However, I am now
experiencing a problem with qmail-remote hanging.
The problem I see is with qmail-remote failing to terminate when a
connection times-out. If