/libproc-swift

Swift wrapper for proc library

Primary LanguageSwiftMIT LicenseMIT

libproc-swift

Swift wrapper for proc library.

Example

import Darwin
import Proc

func main() throws {

    // To get pid path:
    let path = try Proc.pidPath(getpid()).get()
    print(path)
    
    // To list all pids:
    let pids = try Proc.listAllPids().get()
    print(pids)
    
    // To get `proc_bsdinfo`:
    let info = try Proc.pidInfo(proc_bsdinfo.self, getpid(), 0).get()
    print(info)
}

main()