Version 2 of Tclhttpd as a Windows Service

Updated 2003-11-20 23:10:49

I'm looking at the possibility of turning Tclhttpd into a Windows (NT, 2000, etc.) service. Currently, I'm using ActiveState's Tcl Dev Kit to facilitate this. Does anyone have experiences or advice to relate on this topic?

- WJR


JH This is possible starting with Tcl Dev Kit. You have to watch out for the various special handling that Windows services require. If you have timeout startup issues, you need to look for bare

        vwait forever

which is typical in server scripts to start the event loop, but must not exist for NT Tcl services. This is correct:

    if {![info exists tcl_service] && ![info exists tk_version]} {
        vwait forever
    }

For those wanting to create an actual starpack (single-file executable) out of tclhttpd on Windows, you will need Tcl Dev Kit 3.0, which includes a base kit designed for use as an NT service.