Anton Blanchard
bdeb4bab50
Restore terminal if exit is called inside a TCL script at startup
...
If exit is called in a TCL script that is executed at startup, the libc
exit() function is called directly and we don't get a chance to reset
the terminal. We return to the shell with echo off, and have to run
"reset". A simple example:
echo exit > test.tcl
magic -noconsole -dnull test.tcl
There are a few ways we could solve this. We could register an exit
handler using atexit(). Here I use Tcl_SetExitProc() to register a
callback with the TCL interpreter.
2021-02-18 11:38:42 +11:00
..
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2017-04-25 08:41:48 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-06-01 16:49:59 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2021-02-18 11:38:42 +11:00
2020-05-23 17:13:14 -04:00
2019-03-22 19:58:47 -04:00
2020-08-11 16:50:26 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2021-01-04 09:47:03 -05:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2017-04-25 08:41:48 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-12-16 11:49:24 -05:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00
2020-05-23 17:13:14 -04:00