                                                      p_comm: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                                                      e_ppid: 0,
                                                      e_pgid: 0,
-                                                     uid: 0)
+                                                        uid: 0)
                 kinfo_for_pid(pid, &kinfoProc)
                 
                 

            // For each process
            for var i = 0; i < Int(processCount); ++i {
                let process = processList[i]
                var pid : pid_t = 0
                
                result = pid_for_task(process, &pid)
                

import Darwin
import Foundation

//--------------------------------------------------------------------------
// MARK: PUBLIC GLOBAL PROPERTIES
//--------------------------------------------------------------------------

// As defined in <mach/machine.h>

/// Assuming this is interpreted as unknown for now
public let CPU_TYPE_ANY       : cpu_type_t = -1
public let CPU_TYPE_X86       : cpu_type_t = 7
public let CPU_TYPE_I386      : cpu_type_t = CPU_TYPE_X86   // For compatibility
public let CPU_TYPE_X86_64    : cpu_type_t = CPU_TYPE_X86 | CPU_ARCH_ABI64
public let CPU_TYPE_ARM       : cpu_type_t = 12
public let CPU_TYPE_ARM64     : cpu_type_t = CPU_TYPE_ARM | CPU_ARCH_ABI64
public let CPU_TYPE_POWERPC   : cpu_type_t = 18
public let CPU_TYPE_POWERPC64 : cpu_type_t = CPU_TYPE_POWERPC | CPU_ARCH_ABI64


/// Process information
public struct ProcessInfo {
    
    let pid     : Int
    let ppid    : Int
    let pgid    : Int
    let uid     : Int
    let command : String
    /// What architecture was this process compiled for?
    let arch    : cpu_type_t
    /// sys/proc.h - SIDL, SRUN, SSLEEP, SSTOP, SZOMB
    var status  : Int32
    
    
    public init(pid: Int, ppid: Int, pgid: Int, uid: Int, command: String,
                                                             arch: cpu_type_t,
                                                           status: Int32) {
        self.pid     = pid
        self.ppid    = ppid
        self.pgid    = pgid
        self.uid     = uid
        self.command = command
        self.arch    = arch
        self.status  = status
    }
}
