Skip to content
SysProcWaitFor

SysProcWaitFor

SysProcWaitFor

Description

Block the parent process and wait for provided child process to finish execution. This will wait for given time, otherwise will continue execution to parent without closing the child process. Parent may then call terminate if they need the process to end.

Parameters

Name Direction Description
proc in Child process handle to wait for.
timeout in Timeout in milliseconds, 0 for infinite wait.

Success

Return

Failure

Abort with log message.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    SysProcStatus SysProcWaitFor(SysProc *proc, u64 timeout_ms) {
        if (!proc) {
            LOG_FATAL("Invalid arguments");
    
        // wait for program to exit for 1 second
        SysProcWaitFor(proc, 1000);
    
        // finally terminate
Last updated on