Skip to content

Commit 3eb6f8a

Browse files
committed
changed syscall signal to sigint
1 parent d55622e commit 3eb6f8a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

e2e/tests/replacepods/replacepods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var _ = DevSpaceDescribe("replacepods", func() {
3939
framework.ExpectNoError(err)
4040
})
4141

42-
ginkgo.FIt("should inject restart helper and restart container", func() {
42+
ginkgo.It("should inject restart helper and restart container", func() {
4343
tempDir, err := framework.CopyToTempDir("tests/replacepods/testdata/restart-helper")
4444
framework.ExpectNoError(err)
4545
defer framework.CleanupTempDir(initialDir, tempDir)

helper/util/restart_linux.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,8 @@ func (*containerRestarter) RestartContainer() error {
7070
}
7171

7272
// kill the process group
73-
process := &os.Process{
74-
Pid: pgid,
75-
}
76-
_ = process.Signal(syscall.SIGINT)
77-
time.Sleep(5000)
73+
_ = syscall.Kill(-pgid, syscall.SIGINT)
74+
time.Sleep(2000)
7875
_ = syscall.Kill(-pgid, syscall.SIGKILL)
7976
return nil
8077
}

0 commit comments

Comments
 (0)