-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
procstats: bump taskstats and fix file handle leak
The taskstats file handle is not being closed and thus it is possible for file descriptors to pile up forever. Pull in a much newer version and fix this problem. In addition, I don't think the naked returns or check helper are doing any favors for readability and have removed them in this block in favor of switch error handling. Signed-off-by: Matt Layher <[email protected]>
- Loading branch information
Showing
6 changed files
with
51 additions
and
47 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package procstats | ||
|
||
func collectDelayInfo(_ int) (info DelayInfo) { | ||
func collectDelayInfo(_ int) (DelayInfo, error) { | ||
// TODO | ||
return | ||
return DelayInfo{}, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package procstats | ||
|
||
func collectDelayInfo(pid int) (info DelayInfo) { | ||
func collectDelayInfo(_ int) (DelayInfo, error) { | ||
// TODO | ||
return | ||
return DelayInfo{}, nil | ||
} |