tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SIGIO, siginfo



On Jan 21, 12:03am, yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
-- Subject: Re: SIGIO, siginfo

| > Ouch, this seems to me like asking for trouble. What are the semantics if
| > a process does a dup2() to this file descriptor then, or closes it before
| > a queued sigio is delivered?
| 
| iirc, linux just saves the descripter which was used for the fcntl
| as a plain integer.  it won't be affected by dup or close.

Yes, that is what I meant. What if I end up talking to the wrong file
descriptor? I would need to unregister that integer, each time the context
referenced to by that integer changes. I am fine to add the integer fd
there, but I think that it raises other interesting issues.

| > | i don't think SIGIO and its fcntl/ioctl are in POSIX.
| > | SIGPOLL is in POSIX, but it's for STREAMS which we don't have.
| > 
| > This is historically true, but I think at this point most implementations
| > consider them aliases. TOG's signal page does not associate it with streams
| > but TOG's ioctl page does (since it include <stropts.h>).
| > 
| > | > http://en.wikipedia.org/wiki/SIGPOLL
| > | 
| > | which part of the page are you reffering to?
| > | "On Linux, SIGIO is a synonym for SIGPOLL." ?
| > 
| > "On POSIX-compliant platforms, SIGPOLL is the signal thrown by computer
| > programs when asynchronous I/O event occurs."
| 
| i guess that wikipedia isn't a right place to look. :)
| 
| anyway, i don't have a strong opinion about the SIGPOLL synonym.
| 
| > What should we do about the inconsistent direction?
| 
| it was due to simple bugs.  fixed.

Thanks!

christos


Home | Main Index | Thread Index | Old Index