[Top][All Lists]

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

Re: Reprise: external pager quitting kills standard error

From: Daniel J Sebald
Subject: Re: Reprise: external pager quitting kills standard error
Date: Sun, 30 Jan 2005 16:30:33 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Daniel J Sebald wrote:

Furthermore, the external pager is a stream. And it wouldn't surprise me that when large amounts of data are put into the stream and the other end quits while there is still stuff to be pulled out, that the stream might think the external pager has died. (Does "less" pull everything out of the stream at the beginning? Or only as the cursor is advanced?)

And below is the portion of code that print's out the "warning: broken pipe" message. The "FIXME" message is a bit suspicious as it has something to do with the octave interrupt state, which is what that chunk of code I sent last time from pager.cc seems to mess with.

Now, the code below is beyond my skill. Is my compilation in fact including "SIGPIPE"? I don't know. Is that chunk of code just not being run for some reason? I don't know. MAYBE_ACK...? Don't know. MAYBE_REINSTALL...? Don't know. Do I know how sig pipes work? Not really.


#ifdef SIGPIPE
sigpipe_handler (int /* sig */)


 if (pipe_handler_error_count++ == 0)
   std::cerr << "warning: broken pipe\n";

 // Don't loop forever on account of this.

 // XXX FIXME XXX -- will setting octave_interrupt_state really help
 // here?

 if (pipe_handler_error_count  > 100 && octave_interrupt_state >= 0)

#endif /* defined(SIGPIPE) */

reply via email to

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