I hereby claim:
- I am ketotek on github.
- I am acopot (https://keybase.io/acopot) on keybase.
- I have a public key whose fingerprint is 8EA7 B1EC 2F34 BA2E 4259 AD10 6A79 B676 A951 1D45
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import Darwin | |
// Call proc_listallpids once with nil/0 args to get the current number of pids | |
let initialNumPids = proc_listallpids(nil, 0) | |
// Allocate a buffer of these number of pids. | |
// Make sure to deallocate it as this class does not manage memory for us. | |
let buffer = UnsafeMutablePointer<pid_t>.allocate(capacity: Int(initialNumPids)) | |
defer { | |
buffer.deallocate() |