wait.go 394 B

1234567891011121314151617
  1. package process
  2. import (
  3. procpkg "github.com/docker/docker/pkg/process"
  4. "gotest.tools/v3/poll"
  5. )
  6. // NotAlive verifies the process doesn't exist (finished or never started).
  7. func NotAlive(pid int) func(log poll.LogT) poll.Result {
  8. return func(log poll.LogT) poll.Result {
  9. if !procpkg.Alive(pid) {
  10. return poll.Success()
  11. }
  12. return poll.Continue("waiting for process to finish")
  13. }
  14. }