]> git.lyx.org Git - features.git/commitdiff
Fix problem with the nul device on Windows.
authorEnrico Forestieri <forenr@lyx.org>
Thu, 14 May 2009 00:12:07 +0000 (00:12 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 14 May 2009 00:12:07 +0000 (00:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29663 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/Systemcall.cpp

index 70d071c1f0c75a67fe41915ef4ff58ff604428f3..3db5fd0a40d04783eee074aae948b3be63ab1a46 100644 (file)
@@ -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()));