diff options
| author | jvoisin | 2022-03-20 18:20:45 +0100 |
|---|---|---|
| committer | jvoisin | 2022-03-20 18:20:45 +0100 |
| commit | 81dd7f2ef07af306fe83d7755cbac4529aa9fc8d (patch) | |
| tree | 32cc44c6231b30db5ac7b15699297863460784aa /src/tests/disable_function/disabled_functions_shell_exec_signal.phpt | |
| parent | 83b01942dfc80474cc05e09aeef4b44307a7120b (diff) | |
| parent | c38df1077a6c1dfbca1baca049214d053e2e7684 (diff) | |
Merge remote-tracking branch 'sektioneins/master'
Diffstat (limited to 'src/tests/disable_function/disabled_functions_shell_exec_signal.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_shell_exec_signal.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_shell_exec_signal.phpt b/src/tests/disable_function/disabled_functions_shell_exec_signal.phpt new file mode 100644 index 0000000..c0b5103 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_shell_exec_signal.phpt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - shell_exec via signal handler | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (!extension_loaded("pcntl")) print "skip"; ?> | ||
| 6 | <?php if (PHP_VERSION_ID < 70100) print "skip"; ?> | ||
| 7 | --EXTENSIONS-- | ||
| 8 | pcntl | ||
| 9 | --INI-- | ||
| 10 | sp.configuration_file={PWD}/config/disabled_functions_extra.ini | ||
| 11 | pcntl.async_signals=1 | ||
| 12 | --FILE-- | ||
| 13 | <?php | ||
| 14 | declare(ticks=1); | ||
| 15 | ini_set("pcntl.async_signals", "1"); | ||
| 16 | pcntl_signal(SIGALRM, function($signo) { shell_exec("ls"); }); | ||
| 17 | system("kill -14 " . getmypid()); | ||
| 18 | sleep(5); | ||
| 19 | ?> | ||
| 20 | --EXPECTF-- | ||
| 21 | 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 | ||
