Posted to tcl by stever at Sat Aug 01 17:16:27 GMT 2009view raw
- #!/usr/bin/env tclsh
- proc main {} {
- set fh [open appout.log "CREAT APPEND WRONLY"]
- puts $fh [clock seconds]
- close $fh
- after 1000 [list main]
- }
- set cmdline [lindex $argv 0]
- switch $cmdline {
- bground {main; vwait forever}
- default {exec [file normalize [info script]] bground > /dev/null 2>/dev/null & }
- }