Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Changeset 38163 for trunk/base/src

Show
Ignore:
Timestamp:
07/09/08 18:50:57 (5 months ago)
Author:
jmr@…
Message:

In fetch, gracefully handle failure to spawn ping processes. (#15906)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portfetch.tcl

    r37914 r38163  
    362362            } 
    363363            if { ![info exists seen($host)] } { 
    364                 set seen($host) yes 
    365                 lappend hosts $host 
    366                 ui_debug "Pinging $host..." 
    367                 set fds($host) [open "|ping -noq -c3 -t3 $host | grep round-trip | cut -d / -f 5"] 
     364                if {[catch {set fds($host) [open "|ping -noq -c3 -t3 $host | grep round-trip | cut -d / -f 5"]}]} { 
     365                    ui_debug "Spawning ping for $host failed" 
     366                    # will end up after all hosts that were pinged OK but before those that didn't respond 
     367                    set pingtimes($host) 5000 
     368                } else { 
     369                    ui_debug "Pinging $host..." 
     370                    set seen($host) yes 
     371                    lappend hosts $host 
     372                } 
    368373            } 
    369374        }