Changeset 1792 in ProjectBuilder


Ignore:
Timestamp:
Sep 10, 2013, 7:52:20 AM (11 years ago)
Author:
Bruno Cornec
Message:

pb_check_ps now returns a list of 2 params systematically so API changed accordingly everywhere

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1786 r1792  
    27142714            } else {
    27152715                # Is the SSH port free? if not kill the existing process using it after a build timeout period
    2716                 my $vmssh = pb_check_ps($tmpcmd,$vmm);
     2716                my ($vmssh,$void) = pb_check_ps($tmpcmd,$vmm);
    27172717                if ($vmssh) {
    27182718                    my $buildtm = $ENV{'PBVMTMOUT'};
     
    27242724
    27252725                    sleep $buildtm;
    2726                     pb_log(0,"WARNING: Killing the process ($vmssh) using port $nport (previous failed VM ?)\n");
     2726                    pb_log(0,"WARNING: Killing the process ($vmssh) using port $void (previous failed VM ?)\n");
    27272727                    kill 15,$vmssh;
    27282728                    # Let it time to exit
     
    27322732                # Using system allows to kill it externaly if needed,sosupport that in the call
    27332733                pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up","mayfail");
    2734                 $vmpid = pb_check_ps($tmpcmd,$vmm);
     2734                ($vmpid,$void) = pb_check_ps($tmpcmd,$vmm);
    27352735                pb_log(0,"VM $vmm launched (pid $vmpid)\n");
    27362736            }
     
    41994199        last;
    42004200    }
    4201     # Maintain compatibility by just returning PID if no port
    4202     return($vmexist,$vmport) if (defined $vmport);
    4203     return($vmexist);
     4201    return($vmexist,$vmport);
    42044202}
    42054203
Note: See TracChangeset for help on using the changeset viewer.