1--TEST--
2FPM: GH-9754 - stderr is not closed in daemonized run
3--SKIPIF--
4<?php
5include "skipif.inc";
6FPM\Tester::skipIfRoot();
7?>
8--FILE--
9<?php
10
11require_once "tester.inc";
12
13$cfg = <<<EOT
14[global]
15error_log = {{FILE:LOG}}
16pid = {{FILE:PID}}
17[unconfined]
18listen = {{ADDR}}
19pm = dynamic
20pm.max_children = 5
21pm.start_servers = 1
22pm.min_spare_servers = 1
23pm.max_spare_servers = 3
24EOT;
25
26$tester = new FPM\Tester($cfg);
27$tester->start(daemonize: true);
28$tester->expectLogStartNotices();
29$tester->switchLogSource('{{MASTER:OUT}}');
30$tester->expectLogEmpty();
31$tester->switchLogSource('{{FILE:LOG}}');
32$tester->terminate();
33$tester->expectLogTerminatingNotices();
34$tester->close();
35
36?>
37Done
38--EXPECT--
39Done
40--CLEAN--
41<?php
42require_once "tester.inc";
43FPM\Tester::clean();
44?>
45