diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-06-29 14:46:51 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-29 14:49:33 -0700 |
commit | d205926f235258468bfe206388fa1b55cb1ea7fa (patch) | |
tree | 3f0204378a2aac13a4f9fdcdc32192b939c2c5df /pkg/shim/proc/exec_state.go | |
parent | 5f2b3728fc1d71d32912c57d948ba4b15c886f2a (diff) |
Delete PID files right after they are read
The PID files are not used after they are read, so there is
no point in keeping them around until the shim is deleted.
Updates #6225
PiperOrigin-RevId: 382169916
Diffstat (limited to 'pkg/shim/proc/exec_state.go')
-rw-r--r-- | pkg/shim/proc/exec_state.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/shim/proc/exec_state.go b/pkg/shim/proc/exec_state.go index 9c6edd3f5..8d8ecf541 100644 --- a/pkg/shim/proc/exec_state.go +++ b/pkg/shim/proc/exec_state.go @@ -63,8 +63,8 @@ func (s *execCreatedState) Start(ctx context.Context) error { return nil } -func (s *execCreatedState) Delete(ctx context.Context) error { - if err := s.p.delete(ctx); err != nil { +func (s *execCreatedState) Delete(context.Context) error { + if err := s.p.delete(); err != nil { return err } s.transition(deleted) @@ -143,8 +143,8 @@ func (s *execStoppedState) Start(context.Context) error { return fmt.Errorf("cannot start a stopped process") } -func (s *execStoppedState) Delete(ctx context.Context) error { - if err := s.p.delete(ctx); err != nil { +func (s *execStoppedState) Delete(context.Context) error { + if err := s.p.delete(); err != nil { return err } s.transition(deleted) |