mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
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 <lifubang@acmcoder.com> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -116,11 +116,7 @@ func (p *containerProcess) startTime() (uint64, error) {
|
||||
}
|
||||
|
||||
func (p *containerProcess) signal(sig os.Signal) error {
|
||||
s, ok := sig.(unix.Signal)
|
||||
if !ok {
|
||||
return errors.New("os: unsupported signal type")
|
||||
}
|
||||
return unix.Kill(p.pid(), s)
|
||||
return p.cmd.Process.Signal(sig)
|
||||
}
|
||||
|
||||
func (p *containerProcess) externalDescriptors() []string {
|
||||
|
||||
Reference in New Issue
Block a user