Re: SIGIO signals not generated in Redhat 6.2?

From: Uncle George (gatgul@voicenet.com)
Date: Wed Jul 12 2000 - 18:56:11 EST


there does not seem ( from my cursory look ) to be any code in fs/pipe.c
that handles the dispatching of SIGIO's. Looking for SIGIO's on other
device drivers leads me to believe that the SIGIO signal is not implimented
for all drivers. Could also be that SIGIO is centrally dispatched - and
havent found it yet.
Any comments from the linux-kernel folks ?
/gat
anyway i'd still like to see that small sample that u say fails this.

Matt Marlow wrote:

> George, I've set O_ASYNC and O_NONBLOCK using the F_SETFL feature
> of fcntl. It makes no difference - I see no SIGIO being generated.
> See, I've set up a pipe between two independent processes, and hence
> the file descriptor is really the read end of the pipe. The way it
> should work is that I setup for a SIGIO when there is data ready
> to be read. Data gets put into the pipe...and it's ready and
> waiting to be read (I can verify this by polling, reading, etc.),
> but there is no SIGIO.
>
> I've run similar versions of this program under Solaris and SunOS,
> using both BSD and SysV routines, and have never experienced this
> problem. In fact, SunOS issues a SIGIO while Solaris issues a
> SIGPOLL - these all work as documented. Under Linux, something
> isn't right. The man page for fcntl says I should get a SIGIO when
> I/O is possible, but I don't.
>
> If you're really "up" on these Linux signals, and would like a
> chance to see the code to see if you can figure out what's wrong,
> I'd be glad to send it to you. I'm just almost positive it's a
> bug in Linux - I just don't really have the time to debug the
> kernel, etc. Maybe it'll come to this? But I haven't given up
> hope yet that someone else has already "invented this wheel"...
>
> Thanks for your speedy reply!
>
> Matt Marlow
> mmarlow@ucsd.edu
>
> -----Original Message-----
> From: gat@voicenet.com [mailto:gat@voicenet.com]On Behalf Of Uncle
> George
> Sent: Tuesday, July 11, 2000 5:09 PM
> To: Matt Marlow
> Subject: Re: SIGIO signals not generated in Redhat 6.2?
>
> Normally all I/O waits until complete - why gen a signal when u know
> that the I/O completed. U really dont need to see SIGIO untill u want to
> coordinate asyncronous I/O. for this u use the O_NONBLOCK fcntl feature
> for that channel. if u do this, then the I/O on that chan will be
> started, and the SIGIO will INDICATE that an I/O has completed. a
> select()/poll() can be used to tell u which channel completed
> /gat
>
> Matt Marlow wrote:
>
> > Hi, I've been working on a program that is supposed to generate
> > a SIGIO signal whenever there is a read or write on a certain
> > file descriptor. Yet it seems no matter what I do (short of a
> > "kill( SIGIO, getpid() )") I cannot get a SIGIO generated under
> > Redhat 6.2!
> >
> > I've read the man for fcntl a dozen times...have used F_SETOWN
> > and F_SETFL to setup the expected SIGIO, have enabled a handler
> > for SIGIO via sigaction, etc. Running "strace -f -e trace=signal"
> > I get a listing of all the program signals, but never see a
> > SIGIO when stuff is written to/read from the file descriptor.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:15 EST