| Ticket UUID: | 6a61b9d61492a249009d231f362c7a8589552565 | ||
| Title: | fileevent command missing "exception" as acceptable watchMask | ||
| Type: | RFE | Created on: | 2026-06-17 22:06:24 |
| Submitter: | davygrvy | Assigned to: | nobody |
| Subsystem: | 24. Channel Commands | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2026-07-07 09:30:19 |
| Status: | Closed | Closed by: | oehhar |
| Resolution: | Postponed | Closed on: | 2026-07-07 09:30:19 |
| Version: | all | ||
| Description: | ||||
Hi, I'm authoring a channel driver extension that requires the use of an interrupt handler at the script layer which needs the use of TCL_EXCEPTION as a watch mask. https://www.tek.com/en/documents/application-note/how-program-instrument-assert-srq-gpib-bus It is distinctly separate from TCL_READABLE See https://github.com/tcltk/tcl/blob/main/generic/tclIO.c#L9255 "exception" is missing from modeOptions and TCL_EXCEPTION is missing from maskArray | ||||
| User Comments: | ||||
davygrvy added on 2026-06-17 22:25:36:
I was wondering... Does our sockets channel even support OOB data? If Tcl was to support OOB, I don't think it does, and that it used setsockopt(socket, SO_OOBINLINE...), the sockets channel driver's job *should* be to remove it from the stream and fire an exception event handler, if any And maybe that can be done later davygrvy added on 2026-06-18 18:21:37:
Just some more detail about GPIB. It is a different beast compared to a TCP stream and I truly need an exception script to manage the 1980s-era hardware I'm talking with.
An example of my use would be the following:
davygrvy added on 2026-06-22 19:15:10:
I've been pondering this change. exception events on, say a TCP socket, could not only include the OOB byte, but could be used to receive QOS changes, and even nameserver lookups. Maybe something like this:
davygrvy added on 2026-07-05 19:43:22:
From the Tcl_EventProc queued in from the prior Tcl_EventSetupProc of my channel driver's event source, when it calls Tcl_NotifyChannel(..,TCL_EXCEPTION), what happens? Absolutely nothing because [fileevent] is missing the "exception" event type. I create the channel with TCL_EXCEPTION as a valid mask:
int mask (in) An OR-ed combination of TCL_READABLE, TCL_WRITABLE and TCL_EXCEPTION that indicates events that have occurred on this channel. oehhar added on 2026-07-06 15:10:24:
I have started a TIP: https://core.tcl-lang.org/tips/doc/trunk/tip/758.md I was not able to create the corresponding forum thread. It is probably the following blocked tracker: https://static.cloudflareinsights.com/... Anyway, would be great to continue the development there. David, it would be great, if an eventual implementation branch would start with "tip758-". Thanks for all, Harald davygrvy added on 2026-07-06 16:20:00:
Thanks Harald oehhar added on 2026-07-07 09:30:19:
Thanks, Schelte, for making the forum work https://fossil-scm.org/forum/forumpost/4443d58677139ce8. Any discussion should go there now. As information is spread over the core list and in this ticket, it is difficult, but possible. Please allow me to close this ticket and continue in the forum. THanks for all, Harald | ||||
