declarations for the PSC_Process class
More...
#include <poser/decl.h>
#include <sys/types.h>
Go to the source code of this file.
|
#define | PSC_ERR_EXEC 127 |
| The default exit status used for exec() errors.
|
|
declarations for the PSC_Process class
◆ PSC_ProcessMain
typedef int(* PSC_ProcessMain) (int argc, char **argv) |
A main function for a child process.
This is called in a child process by PSC_Process_run().
- Parameters
-
argc | the number of arguments, including the process name, which will be NULL if not specified explicitly |
argv | the array of arguments |
- Returns
- an exit status [-128..127]
◆ PSC_StreamCallback
A callback to receive a PSC_Connection for a standard I/O stream.
When redirection to a pipe is requested for one of the standard I/O streams, this is called with the stream identifier and a PSC_Connection object representing the parent's end of the pipe.
- Parameters
-
obj | some object reference |
type | the standard I/O stream |
conn | the PSC_Connection to use |
◆ PSC_StreamAction
What to do with a standard I/O stream in a child process.
Enumerator |
---|
PSC_SA_LEAVE | leave it alone (inherit from parent)
|
PSC_SA_CLOSE | close it, so the child can't use it
|
PSC_SA_NULL | redirect it to /dev/null (silence)
|
PSC_SA_PIPE | redirect it to a pipe
|
◆ PSC_StreamType
Standard I/O streams of the child process.
Enumerator |
---|
PSC_ST_STDIN | standard input
|
PSC_ST_STDOUT | standard output
|
PSC_ST_STDERR | standard error
|