small modification to stdin/stdout/stderr behaviour in wxExcute()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder 1999-02-10 11:19:10 +00:00
parent d4ec5d3211
commit 616c87c9b7
2 changed files with 12 additions and 0 deletions

View File

@ -327,6 +327,12 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);
// some programs complain about sterr not being open, so
// redirect them:
open("/dev/null", O_RDONLY); // stdin
open("/dev/null", O_WRONLY); // stdout
open("/dev/null", O_WRONLY); // stderr
#ifdef _AIX
execvp ((const char *)*argv, (const char **)argv);

View File

@ -327,6 +327,12 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);
// some programs complain about sterr not being open, so
// redirect them:
open("/dev/null", O_RDONLY); // stdin
open("/dev/null", O_WRONLY); // stdout
open("/dev/null", O_WRONLY); // stderr
#ifdef _AIX
execvp ((const char *)*argv, (const char **)argv);