X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f3d3c68fd3eb2eb36501628e0e23fbafbb1132e..418b74a078f6502deff7ad4a4d562b9cc496774d:/src/unix/utilsunx.cpp diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 0b60c5214c..445f88b9fa 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -253,11 +253,7 @@ long wxExecute( const wxString& command, int flags, wxProcess *process ) argv[argc] = NULL; // do execute the command -#if wxUSE_UNICODE - long lRc = -1; -#else long lRc = wxExecute(argv, flags, process); -#endif // clean up argc = 0; @@ -563,13 +559,17 @@ long wxExecute(wxChar **argv, } // fork the process -#ifdef HAVE_VFORK - pid_t pid = vfork(); + // + // NB: do *not* use vfork() here, it completely breaks this code for some + // reason under Solaris (and maybe others, although not under Linux) + // But on OpenVMS we do not have fork so we have to use vfork and + // cross our fingers that it works. +#ifdef __VMS + pid_t pid = vfork(); #else - pid_t pid = fork(); + pid_t pid = fork(); #endif - - if ( pid == -1 ) // error? + if ( pid == -1 ) // error? { wxLogSysError( _("Fork failed") ); @@ -605,7 +605,7 @@ long wxExecute(wxChar **argv, } } -#ifndef __VMS +#if !defined(__VMS) && !defined(__EMX__) if ( flags & wxEXEC_MAKE_GROUP_LEADER ) { // Set process group to child process' pid. Then killing -pid