On Tue, 11 Mar 2003, jkjellman wrote:

> I am having a little trouble with an open on a pipe.  Here is offending line
> 
> xf86open( "/namedpipe", O_RDONLY | O_NONBLOCK );

I note from the comment in xfToOsOpenFlags that O_RDONLY is zero
(set in xf86_libc.h) so this flag never reaches the real open !

>From "man fifo" on Red Hat 6.2 Linux
        A process can open a FIFO in non-blocking mode. In this case,
        opening for read only will succeed even if noone has opened on
        the write side yet; opening for write only will fail with ENXIO
        (no such device or address) unless the other end has already
        been opened.
Thus the O_RDONLY may be neccesary for the O_NONBLOCK to be effective.

Any idea why we ignore the O_RDONLY flag ?

-- 
Dr. Andrew C. Aitchison         Computer Officer, DPMMS, Cambridge
[EMAIL PROTECTED]       http://www.dpmms.cam.ac.uk/~werdna

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to