mirror of
https://github.com/Cacti/spine.git
synced 2026-12-02 21:37:07 +09:00
## What Adds `.github/instructions/instructions.md` (did not exist on this branch) with a *Script and process execution design principles (do not regress)* section codifying three invariants for script and PHP Script Server execution: 1. One read attempt per command, no looping to EOF. 2. Never block the polling thread in `waitpid()` — single non-blocking WNOHANG attempt, then hand off to an async sweep. 3. Script timeouts must go through `nft_popen()`/`nft_pchild()` (pid-tracked), not a native `popen()`/`pclose()` fallback. ## Why While investigating a reported poller slowdown, this branch's `nft_pclose()` was found to do an unbounded blocking `waitpid()` on the polling hot path. Writing these invariants down so future AI-assisted changes to this branch don't reintroduce that or the related issues found on develop (#614). Tracked in #632. ## What was tested Docs-only change; no build/test impact. Signed-off-by: TheWitness <thewitness@cacti.net>