forked from canonical/snapd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sandbox/cgroup: support killing running snap apps
This is an alternative implmentation to the userd approach in canonical#14160. The userd approach will not work in the absense of user session daemon (i.e. ubuntu-core) or if a snap is started as root. The alternative algorithm kills the running apps in snapd directly in their cgroups. - many: address review comments (thanks @zyga) - add contexts support to FreezeSnapProcesses - add comment on possible race when killing processes in a v2 cgroup - for cgroups V2, only thaw on error - for cgroups V1, add comment explaining why we always need to thaw - update KillSnapProcesses to only send SIGKILL - replace deprecated os.IsNotExist with errors.Is - trim whitespace when reading freezer.state Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
- Loading branch information
1 parent
1d23706
commit 3ccdd9c
Showing
10 changed files
with
546 additions
and
90 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
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
Oops, something went wrong.