summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPipe.c
diff options
context:
space:
mode:
authorneumann <neumann>2023-06-15 16:56:35 (GMT)
committerneumann <neumann>2023-06-15 16:56:35 (GMT)
commit414a984d0417c098b2b9b29d3b5a4aea8eaca5d0 (patch)
tree17061a6901573c9e7a068efb5ad143e54d18ea01 /unix/tclUnixPipe.c
parent4314e8e4388010c2f0151e3a8953db113beda7cc (diff)
downloadtcl-414a984d0417c098b2b9b29d3b5a4aea8eaca5d0.zip
tcl-414a984d0417c098b2b9b29d3b5a4aea8eaca5d0.tar.gz
tcl-414a984d0417c098b2b9b29d3b5a4aea8eaca5d0.tar.bz2
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.
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r--unix/tclUnixPipe.c5
1 files changed, 5 insertions, 0 deletions
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;
}