launch_daemon()

launch_daemon()#

Launch a process as a daemon.

Prototype

PUBLIC int launch_daemon(
    const char  *command,
    const char  *working_dir,
    const char  *output_file
);
        

Parameters

Key

Type

Description

command

const char *

The command to execute as a daemon.

working_dir

const char *

The working directory for the daemon process.

output_file

const char *

The file to redirect the daemon’s output to.


Return Value

Returns the PID of the launched daemon on success, or a negative value on failure.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples