GSpawnFlags

Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). G_SPAWN_LEAVE_DESCRIPTORS_OPEN the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child. G_SPAWN_DO_NOT_REAP_CHILD the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle SIGCHLD yourself), or the child will become a zombie. G_SPAWN_SEARCH_PATH argv[0] need not be an absolute path, it will be looked for in the user's PATH. G_SPAWN_STDOUT_TO_DEV_NULL the child's standard output will be discarded, instead of going to the same location as the parent's standard output. G_SPAWN_STDERR_TO_DEV_NULL the child's standard error will be discarded. G_SPAWN_CHILD_INHERITS_STDIN the child will inherit the parent's standard input (by default, the child's standard input is attached to /dev/null). G_SPAWN_FILE_AND_ARGV_ZERO the first element of argv is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses argv[0] as the file to execute, and passes all of argv to the child.

Values

ValueMeaning
LEAVE_DESCRIPTORS_OPEN1 << 0
DO_NOT_REAP_CHILD1 << 1
SEARCH_PATH1 << 2
STDOUT_TO_DEV_NULL1 << 3
STDERR_TO_DEV_NULL1 << 4
CHILD_INHERITS_STDIN1 << 5
FILE_AND_ARGV_ZERO1 << 6

Meta