-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kill shim on restore if the bundle dir is missing
Some anomalies due to the reboot of containerd(killed by docker daemon), can lead to docker-containerd-shim residue and shim process will not exit except you kill it manually. Signed-off-by: yangshukui <[email protected]>
- Loading branch information
yangshukui
committed
Apr 26, 2017
1 parent
f1a935c
commit 0581e02
Showing
7 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// +build !solaris | ||
|
||
package osutils | ||
|
||
import ( | ||
"syscall" | ||
) | ||
|
||
// SetPDeathSig sets the parent death signal to SIGKILL so that if the | ||
// shim dies the container process also dies. | ||
func SetPDeathSig() *syscall.SysProcAttr { | ||
return &syscall.SysProcAttr{ | ||
Pdeathsig: syscall.SIGKILL, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// +build solaris | ||
|
||
package osutils | ||
|
||
// SetPDeathSig is a no-op on Solaris as Pdeathsig is not defined. | ||
func SetPDeathSig() *syscall.SysProcAttr { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters