Skip to content

Commit 7be1fb4

Browse files
lifubangkolyshkin
authored andcommitted
libct: replace unix.Kill with os.Process.Signal
Because we should switch to unix.PidFDSendSignal in new kernels, it has been supported in go runtime. We don't need to add fall back to unix.Kill code here. Signed-off-by: lifubang <[email protected]>
1 parent aad4d97 commit 7be1fb4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libcontainer/process_linux.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,7 @@ func (p *containerProcess) startTime() (uint64, error) {
116116
}
117117

118118
func (p *containerProcess) signal(sig os.Signal) error {
119-
s, ok := sig.(unix.Signal)
120-
if !ok {
121-
return errors.New("os: unsupported signal type")
122-
}
123-
return unix.Kill(p.pid(), s)
119+
return p.cmd.Process.Signal(sig)
124120
}
125121

126122
func (p *containerProcess) externalDescriptors() []string {

0 commit comments

Comments
 (0)