Mercurial > hg > nginx-tests
comparison lib/Test/Nginx.pm @ 1205:c0fa3f818103
Tests: use read_file() in Test::Nginx::stop().
No functional changes.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 09 Aug 2017 15:57:36 +0300 |
parents | cf14cfe9ec8c |
children | c99c1f43cb15 |
comparison
equal
deleted
inserted
replaced
1204:ba3279915da5 | 1205:c0fa3f818103 |
---|---|
424 sub stop() { | 424 sub stop() { |
425 my ($self) = @_; | 425 my ($self) = @_; |
426 | 426 |
427 return $self unless $self->{_started}; | 427 return $self unless $self->{_started}; |
428 | 428 |
429 local $/; | 429 my $pid = $self->read_file('nginx.pid'); |
430 open F, '<' . $self->{_testdir} . '/nginx.pid' | |
431 or die "Can't open nginx.pid: $!"; | |
432 my $pid = <F>; | |
433 close F; | |
434 | 430 |
435 if ($^O eq 'MSWin32') { | 431 if ($^O eq 'MSWin32') { |
436 my $testdir = $self->{_testdir}; | 432 my $testdir = $self->{_testdir}; |
437 my @globals = $self->{_test_globals} ? | 433 my @globals = $self->{_test_globals} ? |
438 () : ('-g', "pid $testdir/nginx.pid; " | 434 () : ('-g', "pid $testdir/nginx.pid; " |