Posted to tcl by Bradipo at Thu Sep 27 17:28:25 GMT 2018view pretty

# Callback handler
proc service_control_handler {control {name ""} {seq 0} args} {
    global echo
    if {![catch {open $::env(TEMP)/my-log.txt w} fd]} {
        puts $fd "$control $name $seq $args"
        catch {close $fd}
    }