• I think I found a bug in the fileevent command

    From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Wed Jun 17 12:13:07 2026
    From Newsgroup: comp.lang.tcl

    Hi,

    https://github.com/tcltk/tcl/blob/main/generic/tclIO.c#L9255

    "exception" is missing and in the next line TCL_EXCEPTION is also missing.

    I'm writing a channel driver extension that will need this for scripting out-of-band interrupts. https://www.tek.com/en/documents/application-note/how-program-instrument-assert-srq-gpib-bus
    This is exactly what TCL_EXCEPTION is for.

    https://github.com/tcltk/tcl/blob/main/generic/tcl.h#L1318

    For example, I need a usage such as this:


    package require agpib ;# my thing under development

    # open the device on address 16 of the first board (/dev/gpib0)
    set dmm [agpib::open -brd 0 -pad 16]

    # set channel options (generic set)
    fconfigure $dmm -blocking yes -encoding ascii -translation none

    # set channel options (GPIB type specific)
    fconfigure $dmm -term eoi -timeout 300u

    # Set up the exception script to manage STB from the incoming
    # SRQ/RQS interrupts on the bus.
    #
    fileevent $dmm exception \
    [list dmm_stb $dmm [subst -noc {[fconfigure $dmm -laststb]}]]

    goes bang -^


    TCL_EXCEPTION should be a proper watch mask. I think I might have the
    first channel driver to ever need such a thing.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Wed Jun 17 22:31:32 2026
    From Newsgroup: comp.lang.tcl

    David !
    Great to hear from you. You have authored the gread Windows socket
    driver. I remember all this.

    Now to you bug report: shall I forward this to a TCL ticket or will you
    do it? If you need any rights on fossil, just ask. The door is open.

    Thanks for all,
    Harald

    Am 17.06.2026 um 21:13 schrieb David Gravereaux:
    Hi,

    https://github.com/tcltk/tcl/blob/main/generic/tclIO.c#L9255

    "exception" is missing and in the next line TCL_EXCEPTION is also missing.

    I'm writing a channel driver extension that will need this for scripting out-of-band interrupts. https://www.tek.com/en/documents/application- note/how-program-instrument-assert-srq-gpib-bus
    This is exactly what TCL_EXCEPTION is for.

    https://github.com/tcltk/tcl/blob/main/generic/tcl.h#L1318

    For example, I need a usage such as this:


    package require agpib  ;# my thing under development

    # open the device on address 16 of the first board (/dev/gpib0)
    set dmm [agpib::open -brd 0 -pad 16]

    # set channel options (generic set)
    fconfigure $dmm -blocking yes -encoding ascii -translation none

    # set channel options (GPIB type specific)
    fconfigure $dmm -term eoi -timeout 300u

    # Set up the exception script to manage STB from the incoming
    # SRQ/RQS interrupts on the bus.
    #
    fileevent $dmm exception \
            [list dmm_stb $dmm [subst -noc {[fconfigure $dmm -laststb]}]]

    goes bang -^


    TCL_EXCEPTION should be a proper watch mask.  I think I might have the first channel driver to ever need such a thing.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Wed Jun 17 13:46:00 2026
    From Newsgroup: comp.lang.tcl

    My use of TCL_EXCEPTION would seem to be different than, for example,
    TCP's OOB which is done with setsockopt(socket, SO_OOBINLINE...) which I
    don't know if our sockets channel even supports that

    https://learn.microsoft.com/en-us/windows/win32/winsock/protocol-independent-out-of-band-data-2
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Wed Jun 17 13:52:53 2026
    From Newsgroup: comp.lang.tcl

    On 6/17/26 1:31 PM, Harald Oehlmann wrote:
    shall I forward this to a TCL ticket or will you do it?

    <waves> I'm rusty at all this...
    A forward would be great as I don't know where things are anymore
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Wed Jun 17 15:08:01 2026
    From Newsgroup: comp.lang.tcl

    Harald, got it https://core.tcl-lang.org/tcl/tktview/6a61b9d61492a249009d231f362c7a8589552565 --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Thu Jun 18 22:55:01 2026
    From Newsgroup: comp.lang.tcl

    Am 18.06.2026 um 00:08 schrieb David Gravereaux:
    Harald, got it
    https://core.tcl-lang.org/tcl/ tktview/6a61b9d61492a249009d231f362c7a8589552565

    Great, sorry, It was to late for me yesterday...
    Harald
    --- Synchronet 3.22a-Linux NewsLink 1.2