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:
co-authored by
Claude Sonnet 5.5
parent
47e4ccbefa
commit
a714780bca
@@ -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
|
||||
Reference in New Issue
Block a user