-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code for handling Tasks and Processes, except for "cgroup.procs" vs "tasks", and Tasks being a different type. This patch: - Makes the Task type an alias for Process (as they're identical otherwise) - Adds a `processType` type for the `cgroupProcs` and `cgroupTasks` consts. This type is an alias for "string", and mostly for clarity (indicating it's an 'enum'). - Merges the `cgroup.add()` and `cgroup.addTask()` functions, adding a `pType` argument. - Merges the `cgroup.processes()` and `cgroup.tasks()` functions, adding a `pType` argument. - Merges the `readPids()` and `readTasksPids()` utilities, adding a `pType` argument. - Move locking and validation into `cgroup.add()`. All places using `cgroup.add()` were taking a lock and doing this validation, so looks we can move this code into `cgroup.add()` itself. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information
Showing
3 changed files
with
31 additions
and
127 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