File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3356,7 +3356,9 @@ static int stdin_ready = 0;
33563356static void
33573357MyFileProc (void * clientData , int mask )
33583358{
3359+ int * tfile = clientData ;
33593360 stdin_ready = 1 ;
3361+ Tcl_DeleteFileHandler (* tfile );
33603362}
33613363#endif
33623364
@@ -3373,7 +3375,7 @@ EventHook(void)
33733375 errorInCmd = 0 ;
33743376#ifndef MS_WINDOWS
33753377 tfile = fileno (stdin );
3376- Tcl_CreateFileHandler (tfile , TCL_READABLE , MyFileProc , NULL );
3378+ Tcl_CreateFileHandler (tfile , TCL_READABLE , MyFileProc , & tfile );
33773379#endif
33783380 while (!errorInCmd && !stdin_ready ) {
33793381 int result ;
@@ -3398,9 +3400,6 @@ EventHook(void)
33983400 if (result < 0 )
33993401 break ;
34003402 }
3401- #ifndef MS_WINDOWS
3402- Tcl_DeleteFileHandler (tfile );
3403- #endif
34043403 if (errorInCmd ) {
34053404 errorInCmd = 0 ;
34063405 PyErr_SetRaisedException (excInCmd );
You can’t perform that action at this time.
0 commit comments