Skip to content

[PHP] fix: implement stopped-child wait4 semantics#759

Open
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-6nz/kd-6z5-php-pcntl-wait-rusage
Open

[PHP] fix: implement stopped-child wait4 semantics#759
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-6nz/kd-6z5-php-pcntl-wait-rusage

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Supersedes fork-headed PR #719. This replacement keeps the same head commit (5ab7927) but moves the PR head onto an Automattic/kandelo branch and adds the PHP prefix to the title.

Why this is needed

PHP pcntl PHPTs expect stopped children to be waitable with WUNTRACED, wait4 WNOHANG to remain nonblocking, SIGCONT to resume stopped children, and wait4 rusage pointers to receive a valid structure. The old behavior reported stopped children incorrectly and left rusage unavailable, so the PHP failures were exposing process-runtime gaps rather than PHP problems.

Why this shape makes sense

The change belongs as a focused runtime PR because stopped-child state, wait4 polling, host worker parking/resume, and ABI/rusage copy-out are one process lifecycle contract. Keeping this separate from the PHPT harness makes the harness a consumer of the fixed semantics rather than the place where we hide them.

Why this is the correct fix

Implementing stopped-child state and zeroed rusage copy-out in Kandelo aligns the Node and browser host paths with Unix wait semantics. That is the correct fix because pcntl is testing normal process behavior that other packages will also need, and the branch includes focused kernel and host coverage for that behavior.

Validation

Evidence from the superseded PR remains valid because this replacement has the identical head SHA: Node focused pcntl wait PHPTs PASS 3/3; browser focused pcntl wait PHPTs PASS 3/3; browser offset 9800 limit 100 refresh had 84 pass, 16 skip, 0 fail/time/error; cargo lib tests passed 960 tests; poll_waitable_child passed 5 tests; host process-wait-lifecycle vitest passed 11 tests; ABI check and git diff --check passed.

@github-actions

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-759-staging

ABI v16. 66 built, 1 failed, 67 total.

Package Arch Status Sha
libcurl wasm32 built a6f6534d
libcxx wasm32 built 0d3c1977
libcxx wasm64 built 3117bdac
libpng wasm32 built 697eac68
libxml2 wasm32 built f3af4b10
libxml2 wasm64 built 478af4d0
openssl wasm32 built 96fbd5a6
openssl wasm64 built b53b8ff0
sqlite wasm32 built 10a86a4f
sqlite wasm64 built e74c37db
zlib wasm32 built 1b3d5c6f
zlib wasm64 built 8470f519
bc wasm32 built 6cfa350d
bzip2 wasm32 built f119ff7e
coreutils wasm32 built 0540afb5
curl wasm32 built f33f8926
dash wasm32 built fcc25397
diffutils wasm32 built ea99d8f1
dinit wasm32 built 17078406
fbdoom wasm32 built e7caae32
file wasm32 built 5947df7a
findutils wasm32 built 612b36ac
gawk wasm32 built 5e5b1e9f
git wasm32 built 05247e65
grep wasm32 built d7110a09
gzip wasm32 failed
kandelo-sdk wasm32 built 1049924e
kernel wasm32 built 04eaa270
less wasm32 built 1694caf3
lsof wasm32 built f4fa0fa4
m4 wasm32 built 7d19cec7
make wasm32 built 5671e538
mariadb wasm32 built e0c597fc
mariadb wasm64 built 3e9d5eea
modeset wasm32 built af820f3f
msmtpd wasm32 built 8c1bda31
nano wasm32 built 27d25982
ncurses wasm32 built e2383aa6
netcat wasm32 built 83261f5c
nginx wasm32 built 097a5c70
php wasm32 built 3006a5b4
posix-utils-lite wasm32 built 6defd412
sed wasm32 built 70f07e03
spidermonkey wasm32 built d1b3e35c
tar wasm32 built 98b34b7a
tcl wasm32 built 68c04865
unzip wasm32 built 55097103
userspace wasm32 built f5a1ab12
vim wasm32 built a8847879
wget wasm32 built 163ebe69
xz wasm32 built c4d2e82a
zip wasm32 built 07f4db5d
zstd wasm32 built 5c1b3192
bash wasm32 built 96cb7de6
mariadb-test wasm32 built 1720b71f
mariadb-vfs wasm32 built 6fd5ea84
mariadb-vfs wasm64 built e5b9a397
nethack wasm32 built 6057e6cf
node wasm32 built cfe2bfc0
spidermonkey-node wasm32 built eee81883
vim-browser-bundle wasm32 built 1299a1eb
nethack-browser-bundle wasm32 built b0496c19
rootfs wasm32 built 8baa9688
shell wasm32 built 6c8eff17
lamp wasm32 built 75c74a6e
node-vfs wasm32 built bf002f07
wordpress wasm32 built dda049c8

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant