1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Commit Graph

260 Commits

Author SHA1 Message Date
Niels Dossche c59bfc8d98 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Revert the fix for GH-11498
2023-08-03 21:59:21 +02:00
Niels Dossche f7be15dbad Revert the fix for GH-11498
People relied on manually waiting for children, but the fix for GH-11498
broke this. Fixing this in PHP is fundamentally incompatible with doing
the wait loop in userland. This reverts to the old behaviour.

Closes GH-11863.
2023-08-03 21:48:34 +02:00
Ilija Tovilo 60dd88c93e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Use waitpid(-1) over WAIT_ANY
2023-07-04 10:29:14 +02:00
Ilija Tovilo 46e9c5104c Use waitpid(-1) over WAIT_ANY
This macro is only available in glibc.

Closes GH-11588
2023-07-04 10:28:59 +02:00
Ilija Tovilo 7d188491c4 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix use of uninitialized memory in pcntl SIGCHLD handling
2023-06-27 11:03:42 +02:00
Ilija Tovilo 003cf9da78 Fix use of uninitialized memory in pcntl SIGCHLD handling
psig needs to stay the tail, so that we don't get a dangling element on the end.

Closes GH-11536
2023-06-27 11:02:59 +02:00
Niels Dossche a8bf8e37a9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing WUNTRACED
2023-06-25 11:18:15 +02:00
Niels Dossche 931d8d059b Add missing WUNTRACED
I forgot to add this in GH-11509.

Closes GH-11526.
2023-06-25 11:17:59 +02:00
Niels Dossche 022b6aa4cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11498: SIGCHLD is not always returned from proc_open
2023-06-23 21:58:05 +02:00
nielsdos f39b513916 Fix GH-11498: SIGCHLD is not always returned from proc_open
Linux, and maybe other unixes, may merge multiple standard signals into
a single one. This causes issues when keeping track of process IDs.
Solve this by manually checking which children are dead using waitpid().

Test case is based on taka-oyama's test code.

Closes GH-11509.
2023-06-23 21:56:21 +02:00
Niels Dossche a0e71cb811 Fix maximum argument count of pcntl_forkx()
Closes GH-11199.
2023-05-06 20:56:27 +02:00
Arnaud Le Blanc 37030257b8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:45:50 +01:00
Kévin Dunglas ad85e71421 fix: support for timeouts with ZTS on Linux (#10141) 2023-03-03 11:35:06 +01:00
David Carlier 81aedad452 opcache/pcntl/cli: Fixes few functions signatures. 2023-02-09 19:57:48 +00:00
Arnaud Le Blanc d8fc1af809 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  Fix GH-9298: remove all registered signal handlers in pcntl RSHUTDOWN
2022-11-13 11:05:28 +01:00
Erki Aring 5ecbb1b39d Fix GH-9298: remove all registered signal handlers in pcntl RSHUTDOWN 2022-11-13 10:57:58 +01:00
Máté Kocsis 962baf771d Declare ext/pcntl constants in stubs (#9075) 2022-08-01 10:26:05 +02:00
jcm 520bb2ec6c Fix get/set priority - error handling for MacOS and extra tests
Closes GH-9044.
2022-07-27 13:53:42 +02:00
Aaron Piotrowski 2bc6025c2c Prevent fiber switching in tick function and signal handlers (#9028) 2022-07-16 13:05:16 -05:00
Levi Morrison 280fd680c8 Make vm_interrupt and timed_out atomic (#8327)
This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
should be treated as opaque and only the zend_atomic_bool_* family of
functions should be used.

Note that directly using atomic_bool is complicated. All C++ compilers
stdlibs that I checked typedef atomic_bool to std::atomic<bool>, which
can't be used in an extern "C" section, and there's at least one usage
of this in core, and probably more outside of it.

So, instead use platform specific functions, preferring compiler
intrinsics.
2022-06-01 09:43:25 -06:00
Christoph M. Becker 6c1ea04b9a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix pcntl Haiku build
2022-05-24 15:02:12 +02:00
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 ea62b8089a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8142: Compilation error on cygwin
2022-03-04 16:21:57 +01: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
Christoph M. Becker d6b4039aca Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix pcntl_rfork build for DragonFlyBSD
2022-01-10 13:10:53 +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 ebace1d7d0 pcntl add ECAPMODE from FreeBSD (#7716) 2021-12-21 07:23:22 +01:00
Arnaud Le Blanc aa35499b1c Use new param API in ext/pcntl (#7751) 2021-12-21 07:17:12 +01:00
David CARLIER 283669f1ae pcntl add forkx for solaris based systems. (#7654) 2021-11-30 15:47:14 +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