Changeset 38163


Ignore:
Timestamp:
Jul 10, 2008, 1:50:57 AM (11 years ago)
Author:
jmr@…
Message:

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

File:
1 edited

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        }
Note: See TracChangeset for help on using the changeset viewer.