diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-12 15:22:44 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-12 15:22:44 (GMT) |
| commit | b5e611c7ee0ee135b64456e6851d009679adfb67 (patch) | |
| tree | 916acbfb60e344257b50f591d11cfa38de2e64ff /unix/tclUnixPipe.c | |
| parent | 6cfac6b9fb65a3e2470de5fe54ebba27148a20ce (diff) | |
| parent | 830088187a0558fe12fec8d7691a3d4cfa030ebb (diff) | |
| download | tcl-b5e611c7ee0ee135b64456e6851d009679adfb67.zip tcl-b5e611c7ee0ee135b64456e6851d009679adfb67.tar.gz tcl-b5e611c7ee0ee135b64456e6851d009679adfb67.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'unix/tclUnixPipe.c')
| -rw-r--r-- | unix/tclUnixPipe.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 4e8a758..1e2f3b0 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -1216,6 +1216,20 @@ PipeOutputProc( *---------------------------------------------------------------------- */ +/* + * Bug ad5a57f2f271: Tcl_NotifyChannel is not a Tcl_FileProc, + * so do not pass it to directly to Tcl_CreateFileHandler. + * Instead, pass a wrapper which is a Tcl_FileProc. + */ +static void +PipeWatchNotifyChannelWrapper( + void *clientData, + int mask) +{ + Tcl_Channel channel = (Tcl_Channel)clientData; + Tcl_NotifyChannel(channel, mask); +} + static void PipeWatchProc( void *instanceData, /* The pipe state. */ @@ -1230,7 +1244,7 @@ PipeWatchProc( newmask = mask & (TCL_READABLE | TCL_EXCEPTION); if (newmask) { Tcl_CreateFileHandler(GetFd(psPtr->inFile), newmask, - (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); + PipeWatchNotifyChannelWrapper, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->inFile)); } @@ -1239,7 +1253,7 @@ PipeWatchProc( newmask = mask & (TCL_WRITABLE | TCL_EXCEPTION); if (newmask) { Tcl_CreateFileHandler(GetFd(psPtr->outFile), newmask, - (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); + PipeWatchNotifyChannelWrapper, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->outFile)); } |
