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,20 @@
|
||||
== 1. waitFor(timeout) returns false; it does NOT stop the process
|
||||
waitFor(500ms) = false
|
||||
still alive = true
|
||||
destroy() then waitFor -> exit code 143 (128 + SIGTERM 15 = 143)
|
||||
|
||||
== 2. a shell command spawns a child; destroying the shell orphans it
|
||||
descendants of the shell: 1 -> [/usr/bin/sleep]
|
||||
shell dead, orphan alive = true <- leaked process
|
||||
|
||||
== 3. kill the tree: snapshot descendants first, then kill all
|
||||
shell alive = false, former child alive = false
|
||||
|
||||
== 4. ProcessRunner with a deadline
|
||||
timedOut=true exit=-1 stdout=started elapsed<2s=true
|
||||
|
||||
== 5. a background grandchild keeps the pipe open: readAllBytes() waits for IT
|
||||
sh exited at once, but readAllBytes() took ~4s; got done|late|
|
||||
|
||||
== 6. ProcessRunner is not held hostage by the same command
|
||||
exit=0 stdout=done| returned in under 2s: true (bounded by the 1s reader grace, not by the 4s grandchild)
|
||||
Reference in New Issue
Block a user