Re: ignore(SIGPIPE) in gsm
- From: Miguel de Icaza <miguel nuclecu unam mx>
- To: sopwith redhat com
- CC: gnome-devel-list gnome org, orbit-list cuc edu
- Subject: Re: ignore(SIGPIPE) in gsm
- Date: Tue, 9 Mar 1999 12:44:06 -0600
> 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.
Miguel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]