Qmail
[Top] [All Lists]

Re: Is saferead not really safe on Solaris 8?

To: qmail@list.cr.yp.to
Subject: Re: Is saferead not really safe on Solaris 8?
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
Date: Sat, 25 Nov 2006 22:23:32 +0100 (CET)
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <20061125202235.6038.qmail@nudo.bsws.de>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <20061124.191156.02469879.hanche@math.ntnu.no> <20061125202235.6038.qmail@nudo.bsws.de>
+ Henning Brauer <lists-qmail@bsws.de>:

| AFAIR there is no guarantee that read() cannot block after select()
| anounced readability. The only way to make sure read() won't block
| is using nonblocking sockets.

Hmm.  Interesting, though I am not sure what to make of it.

| however, I have no case at hand where select/poll would indicate
| readability and a read() thereafter would block.

Well, it seems to happen.  I wonder if it could if a signal arrives at
an inopportune moment?  (I just stumbled across djb's page on the
self-pipe trick at http://cr.yp.to/docs/selfpipe.html - but since he
has not employed it in qmail-smtpd, he must have been assuming that it
is not relevant.)

- Harald

<Prev in Thread] Current Thread [Next in Thread>