Am Freitag 16 Juli 2010 schrieb Enrico Forestieri:
> On Fri, Jul 16, 2010 at 07:55:32AM +0200, kuem...@lyx.org wrote:
> > Author: kuemmel
> > Date: Fri Jul 16 07:55:31 2010
> > New Revision: 34910
> > URL: http://www.lyx.org/trac/changeset/34910
> > 
> > Log:
> > only guard terminal output.
> > 
> > Modified:
> >    lyx-devel/trunk/src/support/Systemcall.cpp
> >    lyx-devel/trunk/src/support/SystemcallPrivate.h
> > 
> > Modified: lyx-devel/trunk/src/support/Systemcall.cpp
> > =========================================================================
> > ===== --- lyx-devel/trunk/src/support/Systemcall.cpp        Fri Jul 16 
> > 03:15:55
> > 2010        (r34909) +++ lyx-devel/trunk/src/support/Systemcall.cpp Fri Jul 
> > 16
> > 07:55:31 2010       (r34910) @@ -241,18 +241,18 @@
> > 
> >  }
> > 
> > -SystemcallPrivate::SystemcallPrivate(const std::string& of) :
> > 
> > +SystemcallPrivate::SystemcallPrivate(const std::string& of) :
> >                                  proc_(new QProcess), outindex_(0),
> >                                  errindex_(0),
> > 
> > -                                outfile(of), showout_(false),
> > showerr_(false), process_events(false) +                               
> > outfile(of),
> > +                               
> > terminalOutExists_(os::is_terminal(os::STDOUT)), +                      
> >          terminalErrExists_(os::is_terminal(os::STDERR)), +             
> >                   process_events(false)
> > 
> >  {
> >  
> >     if (!outfile.empty()) {
> >     
> >             // Check whether we have to simply throw away the output.
> >             if (outfile != os::nulldev())
> >             
> >                     proc_->setStandardOutputFile(toqstr(outfile));
> > 
> > -   } else if (os::is_terminal(os::STDOUT))
> > -           setShowOut(true);
> 
> This is wrong. You are going to output to a terminal whenever one exists.
> That was not the logic of what you changed. Output to a terminal should
> be avoided when there isn't a terminal *or* when stdout is redirected
> to a file. Imagine you have "pnmtopng foo.pnm > foo.png", which produces
> binary output. With your change the terminal will be flooded by binary
> data, possibly putting it in a strange state, because in the binary stream
> something interpretable as an escape sequence may be present.

I am always collecting the output in a file ( == redirecting) to be able to 
analyse the output later.
Since I have many debug-keys enabled, the output is huge.

Not happy with disabling redirected output :(

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to