summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit>2001-10-17 07:04:22 (GMT)
committerwolfsuit <wolfsuit>2001-10-17 07:04:22 (GMT)
commit3fe2cfe5a97a03a12bb290db81cfde1d7f5e0061 (patch)
treee4445209b95445e940d591568e5422369a11d7f6
parent6b35d5ac810fe303bef0457ef2341b1e6e37381b (diff)
downloadtk-3fe2cfe5a97a03a12bb290db81cfde1d7f5e0061.zip
tk-3fe2cfe5a97a03a12bb290db81cfde1d7f5e0061.tar.gz
tk-3fe2cfe5a97a03a12bb290db81cfde1d7f5e0061.tar.bz2
Remember to register the Console Interpreter's stdin, stdout & stderr channels with the main interpreter as well.
-rw-r--r--macosx/tkMacOSXAppInit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/macosx/tkMacOSXAppInit.c b/macosx/tkMacOSXAppInit.c
index 661be90..52d17c4 100644
--- a/macosx/tkMacOSXAppInit.c
+++ b/macosx/tkMacOSXAppInit.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.1.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.1.2.2 2001/10/17 07:04:22 wolfsuit Exp $
*/
#include <pthread.h>
#include "tk.h"
@@ -269,11 +269,15 @@ Tcl_AppInit(interp)
#endif /* TK_TEST */
/*
- * This doesn't work yet, still this is roughly what we want to do...
+ * If we don't have a TTY, then use the Tk based console
+ * interpreter instead.
*/
if (ttyname(0) == NULL) {
Tk_InitConsoleChannels(interp);
+ Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDIN));
+ Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDOUT));
+ Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDERR));
if (Tk_CreateConsoleWindow(interp) == TCL_ERROR) {
goto error;
}