diff proxy_noclose.t @ 295:6fe0459b6668

Tests: eliminate startup races in proxy and fastcgi tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 08 Jun 2013 07:02:11 +0400
parents 6a0d934950bc
children 71dfce15bbba
line wrap: on
line diff
--- a/proxy_noclose.t
+++ b/proxy_noclose.t
@@ -69,7 +69,7 @@ http {
 EOF
 
 $t->run_daemon(\&http_noclose_daemon);
-$t->run();
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
@@ -96,6 +96,8 @@ sub http_noclose_daemon {
 	)
 		or die "Can't create listening socket: $!\n";
 
+	local $SIG{PIPE} = 'IGNORE';
+
 	while (my $client = $server->accept()) {
 		$client->autoflush(1);