mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: enable battery top process reader (pipe was closed when setup)
This commit is contained in:
@@ -159,10 +159,6 @@ public class ProcessReader: Reader<[TopProcess]> {
|
||||
|
||||
let pipe = Pipe()
|
||||
|
||||
defer {
|
||||
pipe.fileHandleForReading.closeFile()
|
||||
}
|
||||
|
||||
self.task.standardOutput = pipe
|
||||
self.task.launchPath = "/usr/bin/top"
|
||||
self.task.arguments = ["-o", "power", "-n", "\(self.numberOfProcesses)", "-stats", "pid,command,power"]
|
||||
|
||||
Reference in New Issue
Block a user