diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/README | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXInit.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/macosx/README b/macosx/README index ba58466..39687e0 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.10 2004/11/11 01:24:32 das Exp $ +RCS: @(#) $Id: README,v 1.11 2005/03/09 19:40:52 wolfsuit Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -131,6 +131,10 @@ name. So, for instance this code will spin the spinner: } This was added in Tk 8.4.2 +- If you want to use Remote Debugging with Xcode 1.5 or 2.0, then you need to set +the environment variable XCNOSTDIN to 1 in the Executable editor for Wish Shell. That +will cause us to force closing stdin & stdout. Otherwise, given how Xcode launches +Wish remotely, they will be left open and then Wish & gdb will fight for stdin... 3. Building TclTkAqua --------------------- diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index b7acd4f..3c20b5f 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXInit.c,v 1.7 2005/01/25 06:54:18 das Exp $ + * RCS: @(#) $Id: tkMacOSXInit.c,v 1.8 2005/03/09 19:40:52 wolfsuit Exp $ */ #include "tkInt.h" @@ -167,6 +167,15 @@ TkpInit(interp) * then use the Tk based console interpreter. */ + /* REMOVE ME: Close stdin & stdout for remote debugging otherwise we + * will fight with gdb for stdin & stdout + */ + + if (getenv ("XCNOSTDIN") != NULL) { + close (0); + close (1); + } + if (!isatty(0)) { struct stat st; if (fstat(0, &st) || (S_ISCHR(st.st_mode) && st.st_blocks == 0)) { |