Changeset 939

Show
Ignore:
Timestamp:
10/16/07 17:27:55 (1 year ago)
Author:
kindlund
Message:

Improved VM destroy logic.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-dynamic_updates/bin/StartManager.pl

    r926 r939  
    3838my $driver = undef; 
    3939my $config = undef; 
    40 my $maxrel = -1
     40my $maxrel = undef
    4141my $nexturl = ""; 
    4242my $urllist= ""; 
     
    5353    $driver = getVar(name      => "default_driver", 
    5454                     namespace => "HoneyClient::Agent"); 
     55} 
     56 
     57# Sanity Check.  Make sure $max_relative_links is set. 
     58unless (defined($maxrel)) { 
     59    $maxrel = getVar(name      => "max_relative_links_to_visit", 
     60                     namespace => "HoneyClient::Agent::Driver::Browser"); 
    5561} 
    5662 
  • honeyclient/branches/exp/kindlund-dynamic_updates/etc/honeyclient.xml

    r933 r939  
    102102                </process_name> 
    103103                <max_relative_links_to_visit description="An integer, representing the maximum number of relative links that the browser should visit, before moving onto another website.  If negative, then the browser will exhaust all possible relative links found, before moving on.  This functionality is best effort; it's possible for the browser to visit new links on previously visited websites." default="-1"> 
    104                     -1 
     104                    5 
    105105                </max_relative_links_to_visit> 
    106106                <positive_words description="If a link contains any number of these words, then its probability of being visited (its score) will increase."> 
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager.pm

    r926 r939  
    809809    for (my $counter = 1;; $counter++) { 
    810810 
     811        # XXX: This isn't a valid assumption! 
    811812        # From this point on, catch all errors generated and 
    812813        # assume that the Agent's watchdog process will recover. 
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM.pm

    r817 r939  
    815815    if (defined($DAEMON_PID) && $DAEMON_PID) { 
    816816        $ret = kill("QUIT", $DAEMON_PID); 
     817 
     818        # If the process doesn't respond to 'QUIT', then 
     819        # try 'KILL'. 
     820        if (kill("QUIT", $DAEMON_PID)) { 
     821            kill("KILL", $DAEMON_PID); 
     822        } 
    817823    } 
    818824    if ($ret) {