From 414a984d0417c098b2b9b29d3b5a4aea8eaca5d0 Mon Sep 17 00:00:00 2001 From: neumann Date: Thu, 15 Jun 2023 16:56:35 +0000 Subject: Made variant using USE_POSIX_SPAWN error message compatible This change makes Tcl compiled with USE_POSIX_SPAWN activated error message compatible with previous versions (using fork). Now, the Tcl regression test succeeds without errors. --- unix/tclUnixPipe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 9b66083..f481f66 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -553,8 +553,13 @@ TclpCreateProcess( TclStackFree(interp, dsArray); if (pid == -1) { +#ifdef USE_POSIX_SPAWN + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't execute \"%s\": %s", argv[0], Tcl_PosixError(interp))); +#else Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't fork child process: %s", Tcl_PosixError(interp))); +#endif goto error; } -- cgit v0.12