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.

Reply via email to