|
|
@ -2926,16 +2926,27 @@ foreach vfstail $vfs_tails { |
|
|
|
|
|
|
|
|
|
|
|
#killing process doesn't apply to .kit build |
|
|
|
#killing process doesn't apply to .kit build |
|
|
|
if {$rtname ne "-"} { |
|
|
|
if {$rtname ne "-"} { |
|
|
|
|
|
|
|
#exec $pscmd | grep $targetkit ;#wrong - fails on at least some OSes because grep itself is in the list |
|
|
|
|
|
|
|
#exec ps | grep $targetkit | grep -v grep ;#exclude grep process |
|
|
|
if {![catch { |
|
|
|
if {![catch { |
|
|
|
exec $pscmd | grep $targetkit |
|
|
|
exec $pscmd |
|
|
|
} still_running]} { |
|
|
|
} ps_lines]} { |
|
|
|
set still_running_lines [split [string trim $still_running] \n] |
|
|
|
#we will process without grep for for now - may not be avail on windows? |
|
|
|
|
|
|
|
set still_running_lines [list] |
|
|
|
|
|
|
|
foreach ln [split [string trim $ps_lines] \n] { |
|
|
|
|
|
|
|
if {[string match "* grep *" $ln]} {continue} |
|
|
|
|
|
|
|
if {[string match "*$targetkit*" $ln]} { |
|
|
|
|
|
|
|
lappend still_running_lines $ln |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#set still_running_lines [split [string trim $still_running] \n] |
|
|
|
puts stdout "found ([llength $still_running_lines]) $targetkit instances still running\n" |
|
|
|
puts stdout "found ([llength $still_running_lines]) $targetkit instances still running\n" |
|
|
|
set count_killed 0 |
|
|
|
set count_killed 0 |
|
|
|
set num_to_kill [llength $still_running_lines] |
|
|
|
set num_to_kill [llength $still_running_lines] |
|
|
|
foreach ln [split $still_running \n] { |
|
|
|
foreach ln $still_running_lines { |
|
|
|
puts stdout " $ln" |
|
|
|
puts stdout " $ln" |
|
|
|
|
|
|
|
|
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
if {$::tcl_platform(platform) eq "windows"} { |
|
|
|
set pid [lindex $ln 1] |
|
|
|
set pid [lindex $ln 1] |
|
|
|
if {$forcekill} { |
|
|
|
if {$forcekill} { |
|
|
|