xref: /PHP-8.0/ext/pcntl/tests/bug81577_3.phpt (revision fa0b84a0)
1--TEST--
2Bug #81577: (Exceptions in interrupt handlers: cleanup_live_vars)
3--SKIPIF--
4<?php
5if (!extension_loaded("pcntl")) print "skip pcntl extension not available";
6elseif (!extension_loaded('posix')) die('skip posix extension not available');
7?>
8--XFAIL--
9leaks are not fixed yet
10--FILE--
11<?php
12pcntl_async_signals(true);
13pcntl_signal(SIGTERM, function ($signo) { throw new Exception("Signal"); });
14try {
15	array_merge([1], [2]) + posix_kill(posix_getpid(), SIGTERM);
16} catch (Throwable $ex) {
17	echo get_class($ex) , " : " , $ex->getMessage() , "\n";
18}
19?>
20--EXPECT--
21Exception : Signal
22