File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,16 @@ sub runfile {
204204 my $rc = 0;
205205 my $conf_fn ;
206206
207+ # watch for segfaults
208+ if ($t and !$t -> {match_log }) {
209+ $t -> {match_log } = {};
210+ }
211+ if ($t and $t -> {match_log } and !$t -> {match_log }{-error}) {
212+ $t -> {match_log }{-error} = [];
213+ }
214+ push $t -> {match_log }{-error}, qr / (core dump)/ ;
215+ push $t -> {match_log }{-error}, 1;
216+
207217# Startup nginx with optionally included conf.
208218 if (exists $t {conf } and defined $t {conf }) {
209219 $conf_fn = sprintf " %s /%s_%s_ %06d.conf" ,
@@ -498,7 +508,6 @@ sub match_log {
498508# dbg("Match \"$re\" in $name \"$$rbuf\" ($n)");
499509 if ($$rbuf =~ m /$re / m ) {
500510 $rc = $& ;
501- # print "bonga\n";
502511 last ;
503512 }
504513# TODO: Use select()/poll()
@@ -695,6 +704,7 @@ sub nginx_reset_fd {
695704 return undef ;
696705 }
697706
707+
698708# Any extras listed in "match_log"
699709 if ($t and exists $t -> {match_log }) {
700710 for my $k (keys %{ $t -> {match_log } || {} }) {
You can’t perform that action at this time.
0 commit comments