child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
child's argument vector, in the GLib file name encoding
child's environment, or %NULL to inherit parent's, in the GLib file name encoding
flags from #GSpawnFlags
function to run in the child just before exec()
user data for @child_setup
return location for child process ID, or %NULL
file descriptor to use for child's stdin, or -1
file descriptor to use for child's stdout, or -1
file descriptor to use for child's stderr, or -1
%TRUE on success, %FALSE if an error was set
GException on failure.
2.58
Identical to g_spawn_async_with_pipes() but instead of creating pipes for the stdin/stdout/stderr, you can pass existing file descriptors into this function through the @stdin_fd, @stdout_fd and @stderr_fd parameters. The following @flags also have their behaviour slightly tweaked as a result:
%G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output will be discarded, instead of going to the same location as the parent's standard output. If you use this flag, @standard_output must be -1. %G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error will be discarded, instead of going to the same location as the parent's standard error. If you use this flag, @standard_error must be -1. %G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's standard input (by default, the child's standard input is attached to /dev/null). If you use this flag, @standard_input must be -1.
It is valid to pass the same fd in multiple parameters (e.g. you can pass a single fd for both stdout and stderr).