This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

TCL exec kills its owning tty (was: Unable to initialize fd 0 for /dev/tty1)

On 9/6/2010 11:34 PM, Ryan Johnson wrote:
The last couple days I've gotten some really strange errors. Sometimes I'll alt-tab to an xterm window and start typing, only to have it disappear at the first keystroke. Sometimes `emacs -nw' will get hit instead, leaving both emacs and the xterm pretty much unusable. I haven't been able to get a stack trace
I can reproduce this bug reliably with both 1.7.7 and 1.7.6 versions of cygwin1.dll (which makes me suspect the problem is not there).

The reason I couldn't get a stack trace is because the xterm doesn't receive an error... it just gets an EOF and dutifully exits. Sometimes you can see 'exit' appear just before the window closes.

After some digging, it looks like TCL is the culprit (recall I was running tkdiff). Here's a minimal test case, which will close its controlling tty when it exits:

$ echo 'exec ls' > tty-killer; tclsh tty-killer &

Running the script in the foreground, passing it as a -c argument to bash, or piping it into tclsh, does *not* expose the bug.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]