Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cmd IO handling #1937

Merged
merged 1 commit into from Feb 20, 2024
Merged

Update Cmd IO handling #1937

merged 1 commit into from Feb 20, 2024

Commits on Feb 13, 2024

  1. Update Cmd IO handling

    Update `Cmd.Wait` to return a known error value if it times out waiting
    on IO copy after the command exits (and update `TestCmdStuckIo` to check
    for that error).
    Prior, the test checked for an `io.ErrClosedPipe`, which:
    1. is not the best indicator that IO is stuck; and
    2. is now ignored as an error value raised during IO relay.
    
    Update `stuckIOProcess` logic in `cmd_test.go` to mirror logic in
    `interal/exec.Exec`, using `os.Pipe` for std io that returns an `io.EOF`
    (instead of `io.Pipe`, which does not).
    
    Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
    helsaawy committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    9d12e2b View commit details
    Browse the repository at this point in the history