]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
Set correctly the spacing between atoms in MathData
[lyx.git] / src / support / filetools.cpp
index fcb95faca044afeb201680c3952e326093153b4f..12457cb3ae328a4c2c679887b4313d1949356286 100644 (file)
@@ -1071,10 +1071,14 @@ cmd_ret const runCommand(string const & cmd)
 
 #if defined (_WIN32)
        WaitForSingleObject(process.hProcess, INFINITE);
+       DWORD pret;
+       if (!GetExitCodeProcess(process.hProcess, &pret))
+               pret = -1;
        if (!infile.empty())
                CloseHandle(startup.hStdInput);
        CloseHandle(process.hProcess);
-       int const pret = fclose(inf);
+       if (fclose(inf) != 0)
+               pret = -1;
 #elif defined (HAVE_PCLOSE)
        int const pret = pclose(inf);
 #elif defined (HAVE__PCLOSE)