ProcessSpawner
public protocol ProcessSpawner
                The low-level interface to spawn a process
- 
                  
                  
Spawns a subprocess.
Note
all unmapped descriptors will be closedDeclaration
Swift
func spawn(command: String, arguments: [String], env: [String : String], fdMap: FDMap, pathResolve: Bool) -> SpawnResultParameters
commandprocess to spawn
argumentsarguments to pass
envall environment variables for subprocess
fdMapa list of file descriptor remappings, src -> dst (can be equal)
pathResolveif true, search for executable in PATH
Return Value
pid of spawned process or error if failed
 - 
                  
                  
Add a callback for child process exiting
Declaration
Swift
func reapAsync(pid: pid_t, queue: DispatchQueue, callback: @escaping (Int32) -> Void)Parameters
pidpid of child process
callbackcalled with exit code when child exits
queuequeue the callback is executed on
 
View on GitHub
        ProcessSpawner Protocol Reference