diff options
author | culler <culler> | 2020-10-16 20:45:29 (GMT) |
---|---|---|
committer | culler <culler> | 2020-10-16 20:45:29 (GMT) |
commit | c85b5609e7aad61ee31d389f004694f3be62db35 (patch) | |
tree | 599e94dcafd712aa56b26cf4bf9b80b204a40063 /macosx | |
parent | 5783d04a34a4c680ea7db932c5db2c4aa8691a2e (diff) | |
download | tk-c85b5609e7aad61ee31d389f004694f3be62db35.zip tk-c85b5609e7aad61ee31d389f004694f3be62db35.tar.gz tk-c85b5609e7aad61ee31d389f004694f3be62db35.tar.bz2 |
Allow opting out of using the custom Tcl_ExitProc by defining USE_SYSTEM_EXIT
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXInit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 73d2b82..e895cc0 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -492,14 +492,19 @@ TkpInit( /* * Install our custom exit proc, which terminates the process by * calling [NSApplication terminate]. This does not work correctly if - * we are part of an exec pipeline, so only use it if this process - * was launched by the launcher or if both stdin and stdout are tttys. + * the process is part of an exec pipeline, so it is only used if the + * process was launched by the launcher or if both stdin and stdout are + * ttys. */ +# if !defined(USE_SYSTEM_EXIT) + if (isLaunched || (isatty(0) && isatty(1))) { Tcl_SetExitProc(TkMacOSXExitProc); } +# endif + /* * Install a signal handler for SIGINT, SIGHUP and SIGTERM which uses * Tcl_Exit instead of exit so that normal cleanup takes place if a TK |