mirror of
https://github.com/rancher/os.git
synced 2025-09-02 15:24:32 +00:00
Update vendor
This commit is contained in:
27
vendor/github.com/docker/containerd/supervisor/signal.go
generated
vendored
Normal file
27
vendor/github.com/docker/containerd/supervisor/signal.go
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package supervisor
|
||||
|
||||
import "os"
|
||||
|
||||
type SignalTask struct {
|
||||
baseTask
|
||||
ID string
|
||||
PID string
|
||||
Signal os.Signal
|
||||
}
|
||||
|
||||
func (s *Supervisor) signal(t *SignalTask) error {
|
||||
i, ok := s.containers[t.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
processes, err := i.container.Processes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, p := range processes {
|
||||
if p.ID() == t.PID {
|
||||
return p.Signal(t.Signal)
|
||||
}
|
||||
}
|
||||
return ErrProcessNotFound
|
||||
}
|
Reference in New Issue
Block a user