github.com/moby/docker@v26.1.3+incompatible/integration/internal/process/wait.go (about)

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