process-api: ProcessBuilder and Process API module (pipe-buffer deadlock and its fixes, timeouts and process-tree kill, grandchild holding the pipe, environment/redirect/stdin, ProcessHandle, startPipeline, shell and option injection), ProcessRunner, 14 contract tests

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b3W3uHbHAmM3orhn7b
This commit is contained in:
Ankur
2026-11-26 00:48:44 +05:30
co-authored by Claude Sonnet 5.5
parent 47e4ccbefa
commit a714780bca
21 changed files with 952 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
== 1. WRONG: waitFor() first, read afterwards
child exited within 3s? false
child still alive? true
bytes sitting in the pipe: 65536
== 2. RIGHT (one stream): read to EOF, then waitFor()
read 200000 bytes, exit code 0
== 3. STILL WRONG: read stdout to EOF, but the child also fills stderr
stdout reader finished within 3s? false
== 4. FIX A: merge stderr into stdout, one stream to drain
read 400000 bytes, exit code 0
== 5. FIX B: drain both streams concurrently (what ProcessRunner does)
stdout=200000 stderr=200000 exit=0 timedOut=false
== 6. FIX C: do not pipe at all. Send output to a file or discard it
waitFor() returned immediately with exit code 0