]> git.saurik.com Git - wxWidgets.git/commitdiff
small modification to stdin/stdout/stderr behaviour in wxExcute()
authorKarsten Ballüder <ballueder@usa.net>
Wed, 10 Feb 1999 11:19:10 +0000 (11:19 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Wed, 10 Feb 1999 11:19:10 +0000 (11:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/utilsgtk.cpp
src/gtk1/utilsgtk.cpp

index f27d96bdf88e6281eb5256cc63d9b4d1c1e9329a..543fae806e6cd8d6c9f97f11d97eb9684d2da68b 100644 (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);
index f27d96bdf88e6281eb5256cc63d9b4d1c1e9329a..543fae806e6cd8d6c9f97f11d97eb9684d2da68b 100644 (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);