1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Commit Graph

234 Commits

Author SHA1 Message Date
Christoph M. Becker 5017240ccc Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix pcntl Haiku build
2022-05-24 15:00:47 +02:00
David Carlier e33de9dda8 Fix pcntl Haiku build
guarding SIGIO constant.

Closes GH-8612.
2022-05-24 14:59:50 +02:00
Christoph M. Becker 4b90eef9cf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8142: Compilation error on cygwin
2022-03-04 16:21:39 +01:00
David Carlier 8b15858c58 Fix GH-8142: Compilation error on cygwin
* pcntl: SIGPOLL/si_band is unsupported
* intl: enable the signal apis with `_POSIX_C_SOURCE`

Closes GH-8146.
2022-03-04 16:20:39 +01:00
David Carlier be22018f35 Fix pcntl_rfork build for DragonFlyBSD
RFTSIGZMB flag unsupported, guarding with the said flag instead of system
in case the implementaion catches up with FreeBSD's.

Closes GH-7918.
2022-01-10 13:10:30 +01:00
David Carlier 007046fdd0 pcntl_rfork: following-up suggestions.
removing RFMEM constant.
treating beforehand the only case where rfork would return EINVAL.
2021-06-03 15:13:12 +02:00
Nikita Popov fa9cb6c314 Fix typo in constant name 2021-05-31 14:33:51 +02:00
Joe Watkins 660585e25f fix stub for pcntl_rfork 2021-05-31 13:39:49 +02:00
David Carlier 28382aa1ec pcntl: Adding pcntl_rfork support. 2021-05-31 09:19:15 +02:00
David CARLIER 20ef668978 pcntl add darwin specific flags for who/which especially (#7075)
PRIO_DARWIN_BG to be on part with pthread QOS class and
 energy efficiency.
2021-05-31 09:16:46 +02:00
Nikita Popov 485a42f495 Work around incorrect NSIG on FreeBSD 2021-05-18 17:07:06 +02:00
George Peter Banyard 2068d230d9 Fix [-Wstrict-prototypes] warning in PCNTL extension
To achieve this we need to introduce a new wrapper function with
dummy arguments which calls pcntl_signal_dispatch() to respect
the function pointer signature for a tick function.
2021-05-12 19:02:48 +01:00
KsaR 01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Christoph M. Becker 4196438bb0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #79812: Potential integer overflow in pcntl_exec()
2021-04-12 12:17:02 +02:00
Christoph M. Becker d74c61c133 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #79812: Potential integer overflow in pcntl_exec()
2021-04-12 12:15:07 +02:00
Christoph M. Becker 0a36d417e8 Fix #79812: Potential integer overflow in pcntl_exec()
We use the proper type, and make sure that no overflow can occur by
using `safe_emalloc()` (we can assume that neither string length is
`SIZE_MAX`).

Closes GH-6845.
2021-04-12 12:12:40 +02:00
Nikita Popov 3e01f5afb1 Replace zend_bool uses with bool
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.
2021-01-15 12:33:06 +01:00
Nikita Popov c23eefb1ad Don't leak pcntl last_error across requests 2020-10-22 14:21:22 +02:00
Máté Kocsis 3df306de94 Promote warnings to exceptions in ext/pcntl
Closes GH-6004
2020-08-25 13:02:13 +02:00
Nikita Popov 8fbc618a3c Fix invalid zpp calls in pcntl_get/setpriority 2020-08-13 16:46:02 +02:00
Max Semenik 2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Máté Kocsis 596561009c Fix some UNKNOWN default values
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
George Peter Banyard 24de4274f3 Fix [-Wundef] warning in PCNTL extension 2020-05-20 14:01:10 +02:00
Máté Kocsis 4815be44db Generate function entries from stubs
Converts ext/pcntl, ext/simplexml, ext/snmp, ext/soap, ext/sqlite3.
Closes GH-5421
2020-04-20 10:38:41 +02:00
Nikita Popov fb718ccc7e Suppress SIG_ERR cast warnings
By casting to void*. I don't want to deal with this right now.
2020-04-15 11:01:12 +02:00
Máté Kocsis 736b22dc0b Add stubs for aliases
Closes GH-5187
2020-02-18 21:10:36 +01:00
Nikita Popov 6811222422 Eliminate uses of ZVAL_ZVAL and friends
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.
2020-01-20 10:34:17 +01:00
Máté Kocsis aadd3aaed9 Use RETURN_THROWS() in various places 2020-01-03 21:10:24 +01:00
Máté Kocsis 7b4a4d2ace Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Máté Kocsis 345703724c Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Nikita Popov d011f60eb1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78402: pcntl_signal() misleading error message
2019-12-20 11:03:15 +01:00
Nikita Popov 5155097431 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78402: pcntl_signal() misleading error message
2019-12-20 11:02:57 +01:00
SATO Kentaro cbb0efaeeb Fix #78402: pcntl_signal() misleading error message
An error message can be misleading when a handler
passed to pcntl_signal() is not callable.
2019-12-20 11:02:20 +01:00
Fabien Villepinte f67b27fac6 Fix typo in pcntl_sigwaitinfo proto 2019-11-18 12:53:36 +01:00
Máté Kocsis 9493893412 Cleanup return values when parameter parsing is unsuccessful 2019-10-30 16:05:20 +01:00
Nikita Popov 2041c9abf5 Merge branch 'PHP-7.4' 2019-10-02 10:09:37 +02:00
Nikita Popov e98e1f92c9 Allow SA_RESTART for SIGALRM
If no explicit restart_syscalls is passed, default to
restart_syscalls=0 for SIGALRM only, to reduce BC impact.
2019-10-02 10:09:17 +02:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Craig Duncan 48e696319c Convert pcntl functions arginfo to php stubs 2019-09-20 11:15:22 +02:00
Nikita Popov 99ce142f6e Some pcntl cleanup
Fix some indentation issues and make sure zpp is used consistently.
2019-08-27 17:25:19 +02:00
Nikita Popov a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Dmitry Stogov e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Dmitry Stogov f1b306fe11 Switch to use ZTS cache 2019-03-12 14:15:47 +03:00
c9s 9f6f6fe219 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00
Dmitry Stogov 67682356fb Reinstall pcntl tick handler on each request (it cleared after the first request). 2019-02-20 22:36:51 +03:00
Pedro Magalhães bc54e59a3a Implement pcntl_unshare 2019-02-18 19:20:18 +00:00
Nikita Popov 120137ca14 Merge branch 'PHP-7.3' into PHP-7.4 2019-02-12 10:10:30 +01:00
Nikita Popov 97dd1591af Merge branch 'PHP-7.2' into PHP-7.3 2019-02-12 10:10:22 +01:00
hsldymq b5cb3ac8ec Make pid & uid available while handling realtime signals 2019-02-12 10:09:33 +01:00
Peter Kokot 92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00