1--TEST--
2pcnt_signal_dispatch()
3--EXTENSIONS--
4pcntl
5posix
6--FILE--
7<?php
8
9pcntl_signal(SIGTERM, function ($signo) { echo "Signal handler called!\n"; });
10
11echo "Start!\n";
12posix_kill(posix_getpid(), SIGTERM);
13$i = 0; // dummy
14pcntl_signal_dispatch();
15echo "Done!\n";
16
17?>
18--EXPECT--
19Start!
20Signal handler called!
21Done!
22