diff -ru3 Expect-1.15.orig/Expect.pm Expect-1.15.zeroselectfix/Expect.pm --- Expect-1.15.orig/Expect.pm Tue Mar 19 06:59:29 2002 +++ Expect-1.15.zeroselectfix/Expect.pm Fri Oct 18 16:11:55 2002 @@ -758,7 +758,10 @@ defined($time_left)? $time_left : 'unlimited', " seconds)...\r\n", ) if ($Expect::Exp_Internal or $Expect::Debug); - my $nfound = select($rmask, undef, undef, $time_left); + my $nfound = + length($rmask) == 0 + ? 0 + : select($rmask, undef, undef, $time_left); # go until we don't find something (== timeout). if (not $nfound) {