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

fix(servstate): use WaitDelay to avoid Command.Wait blocking on stdin/out/err #275

Merged
merged 10 commits into from
Aug 18, 2023

Commits on Aug 15, 2023

  1. Use Command.WaitDelay to avoid Command.Wait blocking on stdin/out/err

    Add WaitDelay to ensure cmd.Wait() returns in a reasonable timeframe if
    the goroutines that cmd.Start() uses to copy Stdin/Stdout/Stderr are
    blocked when copying due to a sub-subprocess holding onto them. Read
    more details in these issues:
    
    - golang/go#23019
    - golang/go#50436
    
    This isn't the original intent of kill-delay, but it seems reasonable
    to reuse it in this context.
    
    Fixes canonical#149
    benhoyt committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    10fa2a4 View commit details
    Browse the repository at this point in the history
  2. Use WaitDelay in exec and exec checks too, for good measure

    It's unlikely to be needed here, but it won't hurt either. Use a
    smaller timeout (1s) as these are intended for short-running commands.
    benhoyt committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    77af02a View commit details
    Browse the repository at this point in the history
  3. Canonicalize some log messages

    Our style is to start with an uppercase letter (for logs, not errors)
    and to use "Cannot X" rather than "Error Xing".
    benhoyt committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    e3ed6a1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a256ee8 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Add test for service manager WaitDelay

    Also factor out setupEmptyServiceManager as the same code is used in 7
    places.
    benhoyt committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    f000cc7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d37f5d View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Configuration menu
    Copy the full SHA
    a1e328a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1be67fc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    faf1a9b View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Configuration menu
    Copy the full SHA
    da59527 View commit details
    Browse the repository at this point in the history