From: Vadim Zeitlin Date: Fri, 30 Aug 2002 21:38:12 +0000 (+0000) Subject: don't use vfork() in wxExecute() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ef5f8ab62657cd12c9c4be5e24dd45f3cd464ab9 don't use vfork() in wxExecute() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure.in b/configure.in index 9b9461db7b..6252daa5e1 100644 --- a/configure.in +++ b/configure.in @@ -3025,9 +3025,6 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then fi fi -dnl check for vfork() (even if it's the same as fork() in modern Unices) -AC_CHECK_FUNCS(vfork) - dnl check for the function for temp files creation AC_CHECK_FUNCS(mkstemp mktemp, break) diff --git a/setup.h.in b/setup.h.in index 30a3a4261d..42eb601428 100644 --- a/setup.h.in +++ b/setup.h.in @@ -1046,9 +1046,6 @@ /* Define if you have the usleep function. */ #undef HAVE_USLEEP -/* Define if you have the vfork function. */ -#undef HAVE_VFORK - /* Define if you have the header file. */ #undef HAVE_X11_XKBLIB_H diff --git a/setup.h_vms b/setup.h_vms index 3216cd9b7f..872b63304e 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -1073,9 +1073,6 @@ /* Define if you have the usleep function. */ #define HAVE_USLEEP 1 -/* Define if you have the vfork function. */ -#define HAVE_VFORK 1 - /* Define if you have the header file. */ #undef HAVE_X11_XKBLIB_H diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 6ff5e30984..53f09c4b84 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -563,12 +563,10 @@ long wxExecute(wxChar **argv, } // fork the process -#ifdef HAVE_VFORK - pid_t pid = vfork(); -#else + // + // NB: do *not* use vfork() here, it completely breaks this code for some + // reason under Solaris (and maybe others, although not under Linux) pid_t pid = fork(); -#endif - if ( pid == -1 ) // error? { wxLogSysError( _("Fork failed") );