func PeriodicallyDo ¶
PeriodicallyDo calls f every period until the provided context is cancelled.
func WaitOrStop ¶
func WaitOrStop(ctx context.Context, cmd *exec.Cmd, interrupt os.Signal, killDelay time.Duration) error
WaitOrStop waits for the already-started command cmd by calling its Wait method.
If cmd does not return before ctx is done, WaitOrStop sends it the given interrupt signal. If killDelay is positive, WaitOrStop waits that additional period for Wait to return before sending os.Kill.