Re: Event on the 2nd German Perl Workshop

[email protected] (Artur Bergman)
Newsgroups perl.loop
Message-ID <[email protected]>

On Wed, 15 Mar 2000, Jochen Stenzel wrote:

> > Are you talking about streams? I_SETSIG causing SIGPOLL?
> 
> Ah! Somebody who has probably heard this as well.
>  
> > ... You could actually say "whenever data comes
> > in through the stream head attached to file descriptor blah (ioctl
> > I_SETSIG), cause the kernel to SIGPOLL me with the details.
> 
> This sounds very (interesting and) similar to the things the person told me. Is this designed for writing, too? Is it described anywhere? Do you remember the name of the book?
> 
> You mentioned Solaris, so I suppose it's built in there ... ? If so, the question is if syscalls like select() already benefit from this or if it has to be used a special way.
> 
> By the way, this could possibly be a solution of the EOF problem, couldn't it? (Assumed the kernel sends no message about EOF as "new data".)
> 
> Thank you!
> 
>                 Jochen
>  

All this is described in Stevens Unix Networking volume 1, SIGPOLL and the
various POSIX asynchronous IO methods, it is nothing new but it is nothing
portable (yet).

A fd to a file is always readable under unix, therefore you should not
watch files using select as select will always return readable, have a
timer loop and poll is the only way, and EOF is an error on a socket, not
an error on a file.

 Artur
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.