global builddir
global netlinkfh
global env
+ global pidmap
upvar #0 pids($site) pid
set cf $tmp/$site.conf
set ch [open $cf w]
}
if {[llength $argl]} {
set pid [fork]
+ set pidmap($pid) "secnet $location/$site"
if {!$pid} {
execl [lindex $argl 0] [lrange $argl 1 end]
}
switch -exact $site {
inside {
puts OK
- set ok 1; # what a bodge
- return
+ finish 0
}
outside {
error "inside rx'd!"
proc finish {estatus} {
puts stderr "FINISHING $estatus"
+ signal default SIGCHLD
+ global pidmap
+ foreach pid [array names pidmap] {
+ kill KILL $pid
+ }
exit $estatus
}