Mercurial > hg > nginx-tests
comparison lib/Test/Nginx/POP3.pm @ 162:465a711ffa19
Tests: set SIGALRM handler before arming timer.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 01 Aug 2011 20:23:32 +0400 |
parents | bc3351f157ef |
children | 5137f27935b4 |
comparison
equal
deleted
inserted
replaced
161:2c07dc5bc354 | 162:465a711ffa19 |
---|---|
39 } | 39 } |
40 | 40 |
41 sub read { | 41 sub read { |
42 my ($self) = @_; | 42 my ($self) = @_; |
43 eval { | 43 eval { |
44 local $SIG{ALRM} = sub { die "alarm\n" }; | |
44 alarm(2); | 45 alarm(2); |
45 local $SIG{ALRM} = sub { die "alarm\n" }; | |
46 while (<$self>) { | 46 while (<$self>) { |
47 log_in($_); | 47 log_in($_); |
48 # XXX | 48 # XXX |
49 next if m/^\d\d\d-/; | 49 next if m/^\d\d\d-/; |
50 last; | 50 last; |