mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Amend fb7b7e52
pclose() returns -1 only in specific cases, otherwise it returns the exit status of the child, to be retrieved by the macro WEXITSTATUS.
This commit is contained in:
parent
b278d5ac73
commit
d7910e1870
@ -1148,10 +1148,10 @@ cmd_ret const runCommand(string const & cmd)
|
||||
valid = false;
|
||||
#elif defined (HAVE_PCLOSE)
|
||||
int const pret = pclose(inf);
|
||||
bool const valid = (pret != -1);
|
||||
bool const valid = (WEXITSTATUS(pret) == 0);
|
||||
#elif defined (HAVE__PCLOSE)
|
||||
int const pret = _pclose(inf);
|
||||
bool const valid = (pret != -1);
|
||||
bool const valid = (WEXITSTATUS(pret) == 0);
|
||||
#else
|
||||
#error No pclose() function.
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user