Skip to content

SysProcCreate

SysProcCreate

Description

Create a new process

Parameters

Name Direction Description
path in Path to executable to be executed.
argv in NULL terminated array containing zero-terminated strings.
envp in NULL terminated array containing zero-terminated strings.

Success

New created SysProc object opaque handle.

Failure

NULL.

Usage example (Cross-references)

Usage examples (Cross-references)
    #define WRITE_END 1
    
    SysProc *SysProcCreate(const char *filepath, char **argv, char **envp) {
    #if defined(__APPLE__) || defined(__linux__)
        int stdin_pipe[2]  = {-1};
    int main(int argc, char **argv, char **envp) {
        // create a new child process
        SysProc *proc = SysProcCreate(argv[1], argv + 1, envp);
    
        // write something to it's stdout
Last updated on