Commit Graph

434 Commits

Author SHA1 Message Date
Ilija Tovilo
8eb740b432
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix getpriority test with negative return value
2023-09-22 10:26:10 +02:00
Ilija Tovilo
645ea22390
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix getpriority test with negative return value
2023-09-22 10:26:01 +02:00
Ilija Tovilo
181598d403
Fix getpriority test with negative return value
Negative return values are valid and denote higher priority.

https://man7.org/linux/man-pages/man2/setpriority.2.html
2023-09-22 10:25:15 +02:00
Niels Dossche
633e7455e5 Merge branch 'PHP-8.2'
* PHP-8.2:
  Revert the fix for GH-11498
2023-08-03 21:59:35 +02:00
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
149fb8fc34
Merge branch 'PHP-8.2'
* PHP-8.2:
  Use waitpid(-1) over WAIT_ANY
2023-07-04 10:29:22 +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
28117d718f
Merge branch 'PHP-8.2'
* PHP-8.2:
  Attempt to fix gh11498.phpt on MSAN
2023-06-30 09:42:46 +02:00
Ilija Tovilo
04cd8859dd
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Attempt to fix gh11498.phpt on MSAN
2023-06-30 09:42:34 +02:00
Ilija Tovilo
07dd0c80a8
Attempt to fix gh11498.phpt on MSAN
The issue might be that due to slow instrumentation the process might end before
we get to add it to the processes list. If the SIGCHLD handler executes before
adding the process to the list it will never be removed again.
2023-06-30 09:39:19 +02:00
Ilija Tovilo
db2ac3a656
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix use of uninitialized memory in pcntl SIGCHLD handling
2023-06-27 11:03:48 +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
2209f7508b Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing WUNTRACED
2023-06-25 11:18:25 +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
0de8bc270d Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11498: SIGCHLD is not always returned from proc_open
2023-06-23 22:04:40 +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
Mikhail Galanin
a6911cbd4d
Suppress warning when the test run under non-root (#11400)
When we run the test under non-root user, the test gets BORKed with:

Warning: pcntl_unshare(): Error 1: No privilege to use these flags in ext/pcntl/tests/pcntl_unshare_03.skip.php on line 8
skip Insufficient privileges for CLONE_NEWUSER

It looks like for the root-user there is the similar warning which is already suppressed (see the following "skip").
Let us skip the test properly if we aren't able to execute it
2023-06-08 16:16:47 +02:00
Niels Dossche
80efa76b8b Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix maximum argument count of pcntl_forkx()
2023-05-06 21:00:30 +02:00
Niels Dossche
a0e71cb811 Fix maximum argument count of pcntl_forkx()
Closes GH-11199.
2023-05-06 20:56:27 +02:00
Ilija Tovilo
fc88f155be
Add zend_alloc XLEAK support
In the future we may want to use a different exit code to warn for tests that
didn't leak.

Closes GH-10999
2023-04-03 12:55:26 +02:00
Arnaud Le Blanc
0c7fc351ea Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:56:34 +01: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
8a267b06ca Merge branch 'PHP-8.2' 2023-02-09 19:58:00 +00:00
David Carlier
81aedad452 opcache/pcntl/cli: Fixes few functions signatures. 2023-02-09 19:57:48 +00:00
Máté Kocsis
7936c8085e
Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) 2023-01-23 10:52:14 +01:00
Arnaud Le Blanc
9575968acc Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix GH-9298: remove all registered signal handlers in pcntl RSHUTDOWN
2022-11-13 11:10:10 +01: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
David Carlier
e0e347b4a8 Fix GH-9923: Add the SIGINFO constant in pcntl for system supporting it.
Closes #9938
2022-11-12 19:37:32 +00:00
Ilija Tovilo
86af42be1b
Merge branch 'PHP-8.2'
* PHP-8.2:
  Migrate i386 to GitHub actions
2022-11-03 14:40:35 +01:00
Ilija Tovilo
b08901b63f
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Migrate i386 to GitHub actions
2022-11-03 14:37:59 +01:00
Ilija Tovilo
ed1e703716
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Migrate i386 to GitHub actions
2022-11-03 14:37:17 +01:00
Ilija Tovilo
75970077b0
Migrate i386 to GitHub actions
Closes GH-9856
2022-11-03 14:34:54 +01:00
Kévin Dunglas
e6bfd7e089 Set SA_ONSTACK too when zend signals are disabled and in pcntl
Closes GH-9758.
2022-10-16 23:47:53 +01:00
Tim Düsterhus
03fd405423
Use php_info_print_table_header for actual column headers only (#9485)
Using php_info_print_table_header() for "Foo: bar" looks odd and out of place,
because the whole line is colored. It is also questionable from a HTML
semantics point of view, because it does not described the columns that follow.

The use of this across extensions is inconsistent. It was part of the skeleton,
but ext/date or ext/json already use a regular row.
2022-09-06 08:48:22 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
jcm
663b037c7b QA - pcntl - adjust tests set/get priority check env vars and root user 2022-08-09 21:16:21 +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
Juan Morales
7b301e3a5e
QA - pcntl_signal - error when handler is int and not SIG_DFL or SIG_IGN
Closes GH-9001.
2022-07-14 13:13:59 +02:00
Juan Morales
492f9c607a
QA - pcntl_exec - check stringable parameters error
Closes GH-8990.
2022-07-13 18:29:15 +02:00
Juan Morales
23654a172e
QA - Test Cov - ext:pcntl - pcntl_signal() - max signal allowed (#8956)
Co-authored-by: jcm <juan.carlos.morales@tradebyte.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-07-11 13:45:42 +01: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