Tk Source Code

View Ticket
Login
Ticket UUID: 1572743
Title: Tk hangs on <KeyPress> Events when executed in command pipe
Type: Bug Version: obsolete: 8.5a4
Submitter: ecky-l Created on: 2006-10-07 14:10:13
Subsystem: 69. Events Assigned To: hobbs
Priority: 8 Severity:
Status: Open Last Modified: 2026-09-19 09:58:27
Resolution: None Closed By:
    Closed on:
Description:
Key press events make Tk hung and not responding
anymore on windows. This happens when a Tclsh/Wish is
executed in a command pipeline (via [open "|"]).

It can be easily reproduced in a Tclsh on windows (e.g.
in ActiveTcl's Tclsh84 or Tclsh85):

% set backend [open "| [info nameofexe]" r+]
% fconfigure $backend -buffering line
% puts $backend "package re Tk"

Then, click in the appearing wish main window and press
any key. The window hangs forever and the only way out
there is by

% puts $backend "exit"

in the Tclsh console from where the pipe was opened

I don't know about other platforms, just tried it out
on Windows.
User Comments: serhiy.storchaka added on 2026-09-19 09:58:27:

Cannot reproduce on Windows 11 with tclsh/Tk 9.1: a tclsh started with open "| tclsh" r+ and loading Tk keeps responding to commands over the pipe after key presses in its window.


ecky-l added on 2008-04-05 21:30:00:
Logged In: YES 
user_id=1345135
Originator: YES

It could be, yes. But this has happened all the time and Tk must be killed to resolve it.

nobody added on 2008-04-04 07:26:10:
Logged In: NO 

Is this similar to bug 1779265?