Mercurial > hg > nginx-tests
diff 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 |
line wrap: on
line diff
--- a/stream_ssl.t +++ b/stream_ssl.t @@ -118,10 +118,17 @@ my $ctx = Net::SSLeay::CTX_new() or die( $t->write_file('password_many', "wrong$CRLF" . "localhost$CRLF"); $t->write_file('password_http', 'inherits'); -fork() || exec("echo localhost > $d/password_fifo"); +my $p = fork(); +exec("echo localhost > $d/password_fifo") if $p == 0; $t->run_daemon(\&http_daemon); -$t->run(); + +eval { + open OLDERR, ">&", \*STDERR; close STDERR; + $t->run(); + open STDERR, ">&", \*OLDERR; +}; +kill 'INT', $p if $@; $t->waitforsocket('127.0.0.1:' . port(8081));