Not too sure why this bloxks either.  Under Linux (I'm on 7.2) O_RDONLY is 0
so this should work.  When I make the patch for xfToOsOpenFlags I will or
with O_RDONLY as this will take care of things for 0 or any other value.

When I build without the loader it works fine.  I do this by setting
DoLoadableServer to NO, and build world.

I will run some further tests before I go digging into the loader.  It may
be possible that I missed building some part of the server on my original
build as I did it from the Xserver directory.

Now I have YAP (yet another problem ;-).  I need to have both ports (one
serial and one pipe) able to read data to properly access this device.  It
seems that sine the server only has the file descriptor for the serial port
registered, I only get called when it has data ready.  This makes using the
pipe impossible without halting the server.  I have read through the X11
porting doc covering DIX, OS and DDX layers.  It would seem that any given
device only can use a single port.

Does anyone have any ideas one how I can have the X server core call my
control routine for two seperate devices?  I was thinking about registering
two devices and funneling them into a single module.  I could use the file
descriptor to determine which is which.  Problem is, X seems to always
assume these are serial ports (if isatty fails it tries to set speed, etc.).
I think this would fail on my pipe as it has no such ioctls.  Any help here
would be appreaicated.  If you could point me to a driver that already does
this I would be most greatful.

Take care,
KJohn

  ----- Original Message -----
From: "Andrew C Aitchison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 3:20 AM
Subject: Re: blocking during open


> 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

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

Reply via email to