Spawn a process and wait for its termination
int PtSpawnWait( const char *cmd, const char **argv, const char **env, const PtSpawnOptions_t *opt, pid_t *pidp );
ph
This function spawns a new process and waits for its termination. While the child process is running, Photon events are processed.
If pidp isn't NULL, the process ID of the spawned command is stored in *pidp. This can be used if callback functions need to communicate with the running child process.
The meaning of all the other arguments is the same as for the PtSpawn() function.
The termination status of the child (see waitpid()), or -1 if the child process couldn't be started.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtSpawn(), PtSpawnSetCallback(), PtSpawnDeleteCallback()