summaryrefslogtreecommitdiff
path: root/ext/pcntl
Commit message (Collapse)AuthorAgeFilesLines
* Improve class entry generationMáté Kocsis2021-02-161-1/+0
| | | | Related to GH-6701
* Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsqlMáté Kocsis2021-02-142-2/+3
| | | | Closes GH-6691
* Replace zend_bool uses with boolNikita Popov2021-01-152-6/+6
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Add --repeat testing modeNikita Popov2020-10-304-0/+4
| | | | | | | | | This testing mode executes the test multiple times in the same process (but in different requests). It is primarily intended to catch tracing JIT bugs, but also catches state leaks across requests. Closes GH-6365.
* Don't leak pcntl last_error across requestsNikita Popov2020-10-221-0/+1
|
* Update ext/pcntl parameter namesNikita Popov2020-10-065-39/+39
| | | | Closes GH-6278.
* Run tidyNikita Popov2020-09-1810-30/+30
| | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* Improve type declarations for Zend APIsGeorge Peter Banyard2020-08-281-3/+1
| | | | | | | | | Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
* Promote warnings to exceptions in ext/pcntlMáté Kocsis2020-08-259-34/+113
| | | | Closes GH-6004
* Fix invalid zpp calls in pcntl_get/setpriorityNikita Popov2020-08-131-2/+2
|
* Check permissions in pcntl_unshare_03.phptNikita Popov2020-08-101-2/+5
|
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-093-3/+6
| | | | Closes GH-5958
* Add another round of missing parameter types to stubsMáté Kocsis2020-08-072-3/+9
| | | | Closes GH-5950
* Merge branch 'PHP-7.4'Nikita Popov2020-08-051-2/+5
|\ | | | | | | | | | | * PHP-7.4: Check ps -p availability in process title test Add privilege check in pcntl_unshare test
| * Add privilege check in pcntl_unshare testNikita Popov2020-08-051-2/+5
| | | | | | | | Privileges for CLONE_NEWPID were not checked.
* | Merge branch 'PHP-7.4'Nikita Popov2020-08-051-2/+2
|\ \ | |/ | | | | | | | | | | | | * PHP-7.4: Check ps -p availability in proc_nice test Set AI_CANONNAME flag in socket_addrinfo test Add ipv6 skipif to test Improve privilege check in pcntl_setpriority() test
| * Improve privilege check in pcntl_setpriority() testNikita Popov2020-08-051-2/+2
| | | | | | | | | | We need CAP_SYS_NICE privileges, which might not be available just because we're running as root (Docker...)
| * Suppress warning in pcntl_unshare skipifNikita Popov2020-08-051-1/+1
| |
* | Suppress warning in pcntl_unshare skipifNikita Popov2020-08-051-1/+1
| |
* | Add a few missing types to stubsMáté Kocsis2020-08-012-4/+7
| |
* | Remove proto comments from C filesMax Semenik2020-07-061-48/+24
| | | | | | | | Closes GH-5758
* | Replace EXPECTF when possibleFabien Villepinte2020-06-292-2/+2
| | | | | | | | Closes GH-5779
* | Include stub hash in generated arginfo filesNikita Popov2020-06-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* | Fix some UNKNOWN default valuesMáté Kocsis2020-06-093-17/+21
| | | | | | | | In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
* | Fix [-Wundef] warning in PCNTL extensionGeorge Peter Banyard2020-05-204-13/+13
| |
* | Honor script time limit when calling shutdown functionsAlex Dowad2020-05-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A time limit can be set on PHP script execution via `set_time_limit` (or .ini file). When the time limit is reached, the OS will notify PHP and `timed_out` and `vm_interrupt` flags are set. While these flags are regularly checked when executing PHP code, once the end of the script is reached, they are not checked while invoking shutdown functions (registered via `register_shutdown_function`). Of course, if the shutdown functions are implemented *in* PHP, then the interrupt flag will be checked while the VM is running PHP bytecode and the timeout will take effect. But if the shutdown functions are built-in (implemented in C), it will not. Since the shutdown functions are invoked through `zend_call_function`, add a check of the `vm_interrupt` flag there. Then, the script time limit will be respected when *entering* each shutdown function. The fact still remains that if a shutdown function is built-in and runs for a long time, script execution will not time out until it finishes and the interpreter tries to invoke the next one. Still, the behavior of scripts with execution time limits will be more consistent after this patch. To make the execution time-out feature work even more precisely, it would be necessary to scrutinize all the built-in functions and add checks of the `vm_interrupt` flag in any which can run for a long time. That might not be worth the effort, though. It should be mentioned that this patch does not solely affect shutdown functions, neither does it solely allow for interruption of running code due to script execution timeout. Anything else which causes `vm_interrupt` to be set, such as the PHP interpreter receiving a signal, will take effect when exiting from an internal function. And not just internal functions which are called because they were registered to run at shutdown; there are other cases where a series of internal functions might run in the midst of a script. In all such cases, it will be possible to interrupt the interpreter now. Closes GH-5543.
* | Generate function entries from stubsMáté Kocsis2020-04-203-48/+91
| | | | | | | | | | Converts ext/pcntl, ext/simplexml, ext/snmp, ext/soap, ext/sqlite3. Closes GH-5421
* | Suppress SIG_ERR cast warningsNikita Popov2020-04-152-3/+3
| | | | | | | | By casting to void*. I don't want to deal with this right now.
* | Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-14/+14
| | | | | | | | | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | Annotate function aliases in stubsMáté Kocsis2020-04-041-0/+1
| |
* | Add stubs for aliasesMáté Kocsis2020-02-183-1/+5
| | | | | | | | Closes GH-5187
* | Reindent phpt filesNikita Popov2020-02-038-152/+152
| |
* | Eliminate uses of ZVAL_ZVAL and friendsNikita Popov2020-01-201-1/+1
| | | | | | | | | | | | | | | | Instead add RETURN_COPY(_VALUE) macros will the expected behavior. RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck around, probably because the alternative was to write directly to the return_value variable.
* | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-162-3/+3
| |
* | Use RETURN_THROWS() in various placesMáté Kocsis2020-01-031-3/+3
| |
* | Use RETURN_THROWS() after try_convert_to_string()Máté Kocsis2020-01-031-2/+2
| |
* | Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-311-23/+23
| | | | | | | | Except for some bigger ones: reflection, sodium, spl
* | Merge branch 'PHP-7.4'Nikita Popov2019-12-202-3/+6
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78402: pcntl_signal() misleading error message
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-202-3/+6
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #78402: pcntl_signal() misleading error message
| | * Fix #78402: pcntl_signal() misleading error messageSATO Kentaro2019-12-202-3/+6
| | | | | | | | | | | | | | | An error message can be misleading when a handler passed to pcntl_signal() is not callable.
* | | Fix typo in pcntl_sigwaitinfo protoFabien Villepinte2019-11-181-1/+1
| | |
* | | Add union return types for function stubsMáté Kocsis2019-11-112-17/+10
| | |
* | | Cleanup return values when parameter parsing is unsuccessfulMáté Kocsis2019-10-301-1/+1
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2019-10-241-7/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * PHP-7.4: Skip large ftruncate test if large files not supported Don't test "blocks" in lstat_stat_variation7.phpt Increase FD used in php://fd test Use posix_getuid() to check for root in pcntl_setpriority() test
| * | Use posix_getuid() to check for root in pcntl_setpriority() testNikita Popov2019-10-241-7/+7
| | | | | | | | | | | | | | | Using SUDO_USER doesn't seem to work on Travis ARM CI -- I guess that sudo might be in use without the target being root.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-10-022-2/+10
|\ \ \ | |/ /
| * | Allow SA_RESTART for SIGALRMNikita Popov2019-10-022-2/+10
| | | | | | | | | | | | | | | If no explicit restart_syscalls is passed, default to restart_syscalls=0 for SIGALRM only, to reduce BC impact.
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-254-8/+0
| | | | | | | | | | | | Closes GH-4732.
* | | Convert pcntl functions arginfo to php stubsCraig Duncan2019-09-203-123/+196
| | |
* | | Some pcntl cleanupNikita Popov2019-08-271-42/+54
| | | | | | | | | | | | Fix some indentation issues and make sure zpp is used consistently.