![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
enum KitSpawnFlags; kit_bool_t kit_spawn_sync (const char *working_directory, KitSpawnFlags flags, char **argv, char **envp, char *stdin, char **stdout, char **stderr, int *out_exit_status);
typedef enum { KIT_SPAWN_CHILD_INHERITS_STDIN = 1 << 0, KIT_SPAWN_STDOUT_TO_DEV_NULL = 1 << 1, KIT_SPAWN_STDERR_TO_DEV_NULL = 1 << 2, } KitSpawnFlags;
Flags passed to kit_spawn_sync()
.
kit_bool_t kit_spawn_sync (const char *working_directory, KitSpawnFlags flags, char **argv, char **envp, char *stdin, char **stdout, char **stderr, int *out_exit_status);
Executes a child process and waits for the child process to exit
before returning. The exit status of the child is stored in
out_exit_status
as it would be returned by waitpid()
; standard
UNIX macros such as WIFEXITED()
and WEXITSTATUS()
must be used to
evaluate the exit status.
|
Working directory for child or NULL to inherit parents |
|
A combination of flags from KitSpawnFlags |
|
NULL terminated argument vector |
|
NULL terminated environment or NULL to inherit parents; |
|
String to write to stdin of child or NULL |
|
Return location for stdout from child or NULL. Free with kit_free() .
|
|
Return location for stderr from child or NULL. Free with kit_free() .
|
|
Return location for exit status |
Returns : |
TRUE if the child was executed; FALSE if an error occured and errno will be set. |