diff options
| author | oehhar <harald.oehlmann@elmicron.de> | 2023-11-02 17:00:55 (GMT) |
|---|---|---|
| committer | oehhar <harald.oehlmann@elmicron.de> | 2023-11-02 17:00:55 (GMT) |
| commit | 27bbe3b5e064f2f59c33401a0b613054db151642 (patch) | |
| tree | fc25af316218a7ca1c7fa32df0226a6ec184e21a /unix/tclUnixPipe.c | |
| parent | 35d2a8013960a923e171c730d36430400813aa76 (diff) | |
| parent | 7d470ebdeae5cee9052c1cf794696f2968941110 (diff) | |
| download | tcl-27bbe3b5e064f2f59c33401a0b613054db151642.zip tcl-27bbe3b5e064f2f59c33401a0b613054db151642.tar.gz tcl-27bbe3b5e064f2f59c33401a0b613054db151642.tar.bz2 | |
Merge main
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 8c0b378..08f60b2 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -1233,6 +1233,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. */ @@ -1247,7 +1261,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)); } @@ -1256,7 +1270,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)); } |
