[Top][All Lists]

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

Re: Reprise: external pager quitting kills standard error

From: John W. Eaton
Subject: Re: Reprise: external pager quitting kills standard error
Date: Fri, 11 Feb 2005 21:41:55 -0500

On 10-Feb-2005, I wrote:

| On 10-Feb-2005, Dmitri A. Sergatskov <address@hidden> wrote:
| | I recompiled octave on solaris with gcc-3.4.3 (the one that I have on
| | FC3 systems) and I still do not see problem on solaris.
| | 
| | I cannot trigger it on 2xPPro 200 MHz (RH9, gcc-3.2.2-5) nor on
| | SparcII/Solaris8 (440 MHz) with either gcc-3.3.3 or gcc-3.4.3.
| | 
| | It triggers easily on Celeron laptop (1000MHz) (FC3 gcc-3.4.2),
| | more often then not on 2xAthlonMP 2000MHz and seldom on
| | AtlonXP 1666 MHz (last two - FC3 with gcc 3.4.3-17).
| OK, so this seems like it must be a race condition.  My guess now is
| that the signal arrives when some output is already happening and then
| we print to std::cerr and that screws up the stream state so that
| subsequent output to std::cerr is dropped.  It seems like the solution
| to this problem is to handle these signals the way we now handle
| interrupts, by setting a global flag and then dealing with the event
| when it is safe (i.e., with OCTAVE_QUIT).

I've just checked in some changes that I think will prevent this type of
problem from happening in the future.

The basic idea is to nto try to take action in the signal handler for
SIGPIPE or SIGCHLD signals, but to wait until it is safe (the
locations where OCTAVE_QUIT is used).  If you are interested in the
diffs, look in CVS (either HEAD or the ss-2-1-63-patches branch).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]