Corrected the Tcl exit hook routine so that it passes on the

client data value as the exit status value (this was not at
all clear from the documentation and required a bit of
experimentation).  The fix allows Tcl scripts to exit magic
with a non-zero status by invoking "exit" in Tcl.
This commit is contained in:
Tim Edwards 2023-11-11 13:09:59 -05:00
parent 7db77d47f1
commit 11080465ad
2 changed files with 8 additions and 2 deletions

View File

@ -1 +1 @@
8.3.446
8.3.447

View File

@ -791,10 +791,16 @@ mainInitAfterArgs()
return 0;
}
/*
* Tcl exit procedure hook for the Tcl_Exit() subroutine
*
* clientData is an exit value if "exit" was specified from a script.
*/
void tcl_exit_hook(ClientData clientData)
{
TxResetTerminal();
exit(0);
exit((int)clientData);
}
/*