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:
lfbzhm
2024-11-08 01:43:24 +00:00
committed by Kir Kolyshkin
parent aad4d97d83
commit 346c80d714
+1 -5
View File
@@ -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 {