comparison stream_ssl.t @ 1087:534d209f6ae4

Tests: fixed ssl_password_file test hang with missing FIFO reader.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 06 Dec 2016 14:06:44 +0300
parents 90a0d85436c1
children 89d7d4d1be40
comparison
equal deleted inserted replaced
1086:b3b1403641d3 1087:534d209f6ae4
116 116
117 $t->write_file('password', 'localhost'); 117 $t->write_file('password', 'localhost');
118 $t->write_file('password_many', "wrong$CRLF" . "localhost$CRLF"); 118 $t->write_file('password_many', "wrong$CRLF" . "localhost$CRLF");
119 $t->write_file('password_http', 'inherits'); 119 $t->write_file('password_http', 'inherits');
120 120
121 fork() || exec("echo localhost > $d/password_fifo"); 121 my $p = fork();
122 exec("echo localhost > $d/password_fifo") if $p == 0;
122 123
123 $t->run_daemon(\&http_daemon); 124 $t->run_daemon(\&http_daemon);
124 $t->run(); 125
126 eval {
127 open OLDERR, ">&", \*STDERR; close STDERR;
128 $t->run();
129 open STDERR, ">&", \*OLDERR;
130 };
131 kill 'INT', $p if $@;
125 132
126 $t->waitforsocket('127.0.0.1:' . port(8081)); 133 $t->waitforsocket('127.0.0.1:' . port(8081));
127 134
128 ############################################################################### 135 ###############################################################################
129 136