Re: ignore(SIGPIPE) in gsm

On Tue, 9 Mar 1999, Drazen Kacar wrote:

> I didn't see the begining of this discussion, so I'm only guessing what the
> problem is, but I think you could do:
> ioctl(fd, I_SETSIG, S_HANGUP);
> on systems which support SVR4 streams and you'll get SIGIO when the
> pipe is closed. I suppose BSD streams have something similar (if pipes
> on BSD are streams, I don't know for sure). I can't help you with Linux,
> though.

I don't want a signal, period. UNIX process signals only work if it is
possible to do all the processing inside the handler. They don't work well
as flow control devices, and what I need to do when I'm using an fd that
becomes invalid is to alter program flow so that an error code gets
returned to the user. In additions, signals can only have one routine set
per program, which means libraries will clash with applications (as is
happening in this case).

-- Elliot
"In film you will find four basic story lines. Man versus man, man
 versus nature, nature versus nature, and dog versus vampire."
    - Steven Spielberg

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]