Skip to content

Commit

Permalink
Fix redirection of stdout and stderr (bnc#943757)
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs authored and jreidinger committed Jan 5, 2016
1 parent ebb643a commit 7af9fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NCurses.cc
Expand Up @@ -563,7 +563,7 @@ void NCurses::RedirectToLog()
{
// redirect stderr to log
close( 2 );
open( log.c_str(), O_APPEND | O_CREAT, 0666 );
open( log.c_str(), O_APPEND | O_CREAT | O_WRONLY, 0666 );
}

yuiMilestone() << "isatty(stdout)" << ( isatty( 1 ) ? "yes" : "no" ) << std::endl;
Expand All @@ -572,7 +572,7 @@ void NCurses::RedirectToLog()
{
// redirect stdout to log
close( 1 );
open( log.c_str(), O_APPEND | O_CREAT, 0666 );
open( log.c_str(), O_APPEND | O_CREAT | O_WRONLY, 0666 );
}
}

Expand Down

0 comments on commit 7af9fb4

Please sign in to comment.