summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_shell_exec_signal.phpt
blob: f99b423323e138b95270b43557cf57914f6f1b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Disable functions - shell_exec via signal handler
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID < 70100) print "skip"; ?>
--EXTENSIONS--
pcntl
--INI--
sp.configuration_file={PWD}/config/disabled_functions_extra.ini
pcntl.async_signals=1
--FILE--
<?php
declare(ticks=1);
ini_set("pcntl.async_signals", "1");
pcntl_signal(SIGALRM, function($signo) { shell_exec("ls"); });
system("kill -14 " . getmypid());
sleep(5);
?>
--EXPECTF--
Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec', %a matched a rule in %a.php on line 4