Re: ignore(SIGPIPE) in gsm

> It does - the problem is that when it is doing that detection, SIGPIPE
> gets generated. I am not doing a select() before every single write() to
> triple-check that the fd has not suddenly changed state - it would slow
> things down too much.

Well, this is a pretty bad side effect of running ORBit, it should be
at least documented.

And I do *think* that you do not get SIGPIPE the first time you write
to a dead socket, you get it the second time.  The first time you get
some meaningful error.

Now, an alternative approach is to make SIGPIPE point to a signal
handler (this way it will get reset over forks).  The signal handler
will just make write return EPIPE on failure.


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