From 2301c5af8f8d12700a565467d28b19534d29543f Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 14 May 2009 00:12:07 +0000 Subject: [PATCH] Fix problem with the nul device on Windows. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29663 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/Systemcall.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index 70d071c1f0..3db5fd0a40 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -98,9 +98,11 @@ int Systemcall::startscript(Starttype how, string const & what) // Qt won't start the process if we redirect stdout/stderr in // this way and they are not connected to a terminal (maybe // because we were launched from some desktop GUI). - if (!outfile.empty()) - process->setStandardOutputFile(toqstr(outfile)); - else if (os::is_terminal(os::STDOUT)) + if (!outfile.empty()) { + // Check whether we have to simply throw away the output. + if (outfile != os::nulldev()) + process->setStandardOutputFile(toqstr(outfile)); + } else if (os::is_terminal(os::STDOUT)) process->setStandardOutputFile(toqstr(os::stdoutdev())); if (os::is_terminal(os::STDERR)) process->setStandardErrorFile(toqstr(os::stderrdev())); -- 2.39.2