diff options
author | neumann <neumann> | 2023-06-30 09:12:02 (GMT) |
---|---|---|
committer | neumann <neumann> | 2023-06-30 09:12:02 (GMT) |
commit | 3f68e9f64ffb09416fc76db2a30bb132f04e4569 (patch) | |
tree | eb61ad7978710de208b2cb56cded674c9e2fe3db /unix/tclUnixPipe.c | |
parent | 414a984d0417c098b2b9b29d3b5a4aea8eaca5d0 (diff) | |
download | tcl-3f68e9f64ffb09416fc76db2a30bb132f04e4569.zip tcl-3f68e9f64ffb09416fc76db2a30bb132f04e4569.tar.gz tcl-3f68e9f64ffb09416fc76db2a30bb132f04e4569.tar.bz2 |
Added auto-configuration of posix_spawnp()
Removed the manual setting of USE_POSIX_SPAWN and
replaced it by HAVE_POSIX_SPAWNP.
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r-- | unix/tclUnixPipe.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index f481f66..48a0e6a 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -13,9 +13,7 @@ #include "tclInt.h" -#define USE_POSIX_SPAWN 1 - -#ifdef USE_POSIX_SPAWN +#ifdef HAVE_POSIX_SPAWNP # include <spawn.h> #endif @@ -445,7 +443,7 @@ TclpCreateProcess( newArgv[i] = Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]); } -#if defined(USE_VFORK) || defined(USE_POSIX_SPAWN) +#if defined(USE_VFORK) || defined(HAVE_POSIX_SPAWNP) /* * After vfork(), do not call code in the child that changes global state, * because it is using the parent's memory space at that point and writes @@ -465,7 +463,7 @@ TclpCreateProcess( } #endif -#ifdef USE_POSIX_SPAWN +#ifdef HAVE_POSIX_SPAWNP { posix_spawn_file_actions_t actions; posix_spawnattr_t attr; @@ -553,7 +551,7 @@ TclpCreateProcess( TclStackFree(interp, dsArray); if (pid == -1) { -#ifdef USE_POSIX_SPAWN +#ifdef HAVE_POSIX_SPAWNP Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't execute \"%s\": %s", argv[0], Tcl_PosixError(interp))); #else |