forked from mirrors/nixpkgs
* Put a timeout on the call to readline.
svn path=/nixos/branches/boot-order/; revision=22338
This commit is contained in:
parent
363806e89b
commit
411139148d
|
@ -209,9 +209,12 @@ sub connect {
|
|||
|
||||
$self->start;
|
||||
|
||||
my $line = readline $self->{socket} or die;
|
||||
local $SIG{ALRM} = sub { die "timed out waiting for the guest to connect\n"; };
|
||||
alarm 300;
|
||||
readline $self->{socket} or die;
|
||||
alarm 0;
|
||||
|
||||
$self->log("connected to guest root shell");
|
||||
|
||||
$self->{connected} = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue