apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: apr_file_open() and non blocking IO
Date Sat, 27 Feb 2010 21:08:42 GMT
On 2/27/2010 8:19 AM, Graham Leggett wrote:
> Hi all,
> I am trying to open a fifo on disk with the O_NONBLOCK flag set, and I
> notice that apr's apr_file_open() cannot do this.
> As a result, if nobody else is already reading from the fifo,
> apr_file_open blocks, and this is the behaviour I want to avoid.
> Does anyone know of any reason why this wouldn't work?

Yes - principal of least surprise.  You cannot deprecate an API in this way,
and the patch deprecating that flag would be rejected anyways.  When you
modify a library, please try to observe your design from several perspectives
at the same time.

If you wanted to submit an acceptable patch, APR would be aware of the file
handle's blocking state, and still respect the requested blocking/nonblocking
nature of the actual IO and poll/select calls.

View raw message