diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-06 20:50:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-06 20:50:24 +0900 |
| commit | 14a8a474120ef4289625f05ba5d87fa9e9d19542 (patch) | |
| tree | e4d810bda2808a5624b313846331b4888facee1f /crates/shirabe-php-rpc/Cargo.toml | |
| parent | 91e7102d02cfcda0bf1b82ae1b3fb30900495360 (diff) | |
| download | php-shirabe-14a8a474120ef4289625f05ba5d87fa9e9d19542.tar.gz php-shirabe-14a8a474120ef4289625f05ba5d87fa9e9d19542.tar.zst php-shirabe-14a8a474120ef4289625f05ba5d87fa9e9d19542.zip | |
fix(php-rpc): carry the worker channel over a socketpair
The transport bound an AF_UNIX path under TMPDIR and waited for the child to
connect. That path has to fit in sun_path (108 bytes), so a deep TMPDIR made
every worker spawn fail, and the bind(2) itself is denied under a sandbox.
The parent now keeps one end of a socketpair and installs the other on
descriptor 3 before exec, which the worker opens as php://fd/3. The pair is
connected from the start, so the accept poll and its ten-second deadline are
gone; a child that dies before reading surfaces as EOF on the first call,
where worker_state already attaches its exit status.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/Cargo.toml')
| -rw-r--r-- | crates/shirabe-php-rpc/Cargo.toml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/shirabe-php-rpc/Cargo.toml b/crates/shirabe-php-rpc/Cargo.toml index cb062e7d..e4675faa 100644 --- a/crates/shirabe-php-rpc/Cargo.toml +++ b/crates/shirabe-php-rpc/Cargo.toml @@ -9,6 +9,7 @@ shirabe-php-shim.workspace = true shirabe-php-src.workspace = true anyhow.workspace = true indexmap.workspace = true +nix.workspace = true tempfile.workspace = true [lints] |
