1--TEST--
2FPM: bug77934 - php-fpm kill -USR2 not working
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{FILE:LOG}}
13pid = {{FILE:PID}}
14process_control_timeout=20
15[unconfined]
16listen = {{ADDR}}
17ping.path = /ping
18ping.response = pong
19pm = dynamic
20pm.max_children = 5
21pm.start_servers = 1
22pm.min_spare_servers = 1
23pm.max_spare_servers = 1
24EOT;
25
26$tester = new FPM\Tester($cfg);
27$tester->start();
28$tester->expectLogStartNotices();
29$tester->ping('{{ADDR}}');
30$tester->signal('USR2');
31$tester->expectLogNotice('Reloading in progress ...');
32$tester->expectLogNotice('reloading: .*');
33$tester->expectLogNotice('using inherited socket fd=\d+, "127.0.0.1:\d+"');
34$tester->expectLogStartNotices();
35$tester->ping('{{ADDR}}');
36$tester->terminate();
37$tester->expectLogTerminatingNotices();
38$tester->close();
39
40?>
41Done
42--EXPECT--
43Done
44--CLEAN--
45<?php
46require_once "tester.inc";
47FPM\Tester::clean();
48?>
49