summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c9
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