Mercurial > hg > nginx-tests
diff ssl_password_file.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 | 8ef51dbb5d69 |
line wrap: on
line diff
--- a/ssl_password_file.t +++ b/ssl_password_file.t @@ -117,7 +117,8 @@ foreach my $name ('localhost', 'inherits $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; # do not mangle with try_run() # we need to distinguish ssl_password_file support vs its brokenness @@ -127,6 +128,7 @@ eval { $t->run(); open STDERR, ">&", \*OLDERR; }; +kill 'INT', $p if $@; ###############################################################################