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:
parent
7db77d47f1
commit
11080465ad
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue