Tests: use kill(9, $pid) on win32. Change daemon termination to use kill(9, $pid) on win32, as normally used kill(TERM, $pid) doesn't work with perlfork emulation and causes process hangs.
diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm index 42f2733..13bb3c0 100644 --- a/lib/Test/Nginx.pm +++ b/lib/Test/Nginx.pm
@@ -210,9 +210,9 @@ my @globals = $self->{_test_globals} ? () : ('-g', "pid $testdir/nginx.pid; " . "error_log $testdir/error.log debug;"); - exec($NGINX, '-c', "$testdir/nginx.conf", '-s', 'stop', - @globals) - or die "Unable to exec(): $!\n"; + system($NGINX, '-c', "$testdir/nginx.conf", '-s', 'stop', + @globals) == 0 + or die "system() failed: $?\n"; } else { kill 'QUIT', `cat $self->{_testdir}/nginx.pid`; @@ -230,7 +230,7 @@ while ($self->{_daemons} && scalar @{$self->{_daemons}}) { my $p = shift @{$self->{_daemons}}; - kill 'TERM', $p; + kill $^O eq 'MSWin32' ? 9 : 'TERM', $p; wait; }