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)
- In
Proc.c:69:
#define WRITE_END 1
SysProc *SysProcCreate(const char *filepath, char **argv, char **envp) {
#if defined(__APPLE__) || defined(__linux__)
int stdin_pipe[2] = {-1};- In
SubProcComm.c:9:
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