Skip to content

Session cancel: when the kill fails, a request blocked writing the command to stdin never returns #112

Description

@Daily-AC

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions