forked from premiere/premiere-libtorrent
Fix exception when calling dup2 with -1
This commit is contained in:
parent
59bdb3db81
commit
22e9370cb6
|
@ -490,8 +490,8 @@ EXPORT int main(int argc, char const* argv[])
|
||||||
fclose(t.output);
|
fclose(t.output);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (redirect_stdout) dup2(old_stdout, fileno(stdout));
|
if (redirect_stdout && old_stdout != -1) dup2(old_stdout, fileno(stdout));
|
||||||
if (redirect_stderr) dup2(old_stderr, fileno(stderr));
|
if (redirect_stderr && old_stderr != -1) dup2(old_stderr, fileno(stderr));
|
||||||
|
|
||||||
if (!tests_to_run.empty())
|
if (!tests_to_run.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue