Found by adversarial review round 3 of PR #109. Severity P2; needs a failing kill (e.g. EPERM) to trigger.
Probe: a two-line command echo $$ > pidfile / sleep 600 followed by ~1 MiB of comment, so writeCommand() blocks on the shell's stdin; cancel, with the kill injected to fail with EPERM. Closed() becomes true but Exec does not return until something else kills the group; only then does the EPERM surface.
Cancellation currently unblocks the output-reading phase (closes the stdout read end) but not the submit phase. Suggested fix: on cancel also close/cancel the stdin write so a blocked writeCommand() returns, and keep the kill error attached.
Found by adversarial review round 3 of PR #109. Severity P2; needs a failing kill (e.g. EPERM) to trigger.
Probe: a two-line command
echo $$ > pidfile/sleep 600followed by ~1 MiB of comment, sowriteCommand()blocks on the shell's stdin; cancel, with the kill injected to fail with EPERM.Closed()becomes true butExecdoes not return until something else kills the group; only then does the EPERM surface.Cancellation currently unblocks the output-reading phase (closes the stdout read end) but not the submit phase. Suggested fix: on cancel also close/cancel the stdin write so a blocked
writeCommand()returns, and keep the kill error attached.