[php-src] PR #13744: Fix posix_spawn cwd incompatibility
| From: | iluuu1994 | Date: | Mon, 18 Mar 2024 16:00:53 +0000 |
| Subject: | [php-src] PR #13744: Fix posix_spawn cwd incompatibility | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25464@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13744
Author: iluuu1994
We switched from fork+exec to posix_spawn for proc_open when available in PHP 8.3. Previously, a cwd
that does not exist, or doesn't have the executable chmod flag set would silent be ignored.
posix_spawn fails, on the other hand.
We provide better backwards compatibility by manually checking for the path. This patch is
technically subject to data races. I'm not sure there is a way to avoid this with posix_spawn.
Fixes GH-13743