Creates a Spawn for execution.
Creates a Spawn for execution.
Adds a delegate to be notified on the end of the child process.
Adds a parameter to the execution program
Closes all open streams and child process.
Executes a command synchronasly and optionally calls delegates for sysout, syserr and end of job
Executes the prepared process
Gets the last error message
See g_spawn_async_with_pipes() for a full description; this function simply calls the g_spawn_async_with_pipes() without any pipes. You should call g_spawn_close_pid() on the returned child process reference when you don't need it any more. Note If you are writing a GTK+ application, and the program you are spawning is a graphical application, too, then you may want to use gdk_spawn_on_screen() instead to ensure that the spawned program opens its windows on the right screen. Note Note that the returned child_pid on Windows is a handle to the child process and not its identifier. Process handles and process identifiers are different concepts on Windows.
On some platforms, notably Windows, the GPid type represents a resource which must be closed to prevent resource leaking. g_spawn_close_pid() is provided for this purpose. It should be used on all platforms, even though it doesn't do anything under UNIX.
A simple version of g_spawn_async() that parses a command line with g_shell_parse_argv() and passes it to g_spawn_async(). Runs a command line in the background. Unlike g_spawn_async(), the G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note that G_SPAWN_SEARCH_PATH can have security implications, so consider using g_spawn_async() directly if appropriate. Possible errors are those from g_shell_parse_argv() and g_spawn_async(). The same concerns on Windows apply as for g_spawn_command_line_sync().
A simple version of g_spawn_sync() with little-used parameters removed, taking a command line instead of an argument vector. See g_spawn_sync() for full details. command_line will be parsed by g_shell_parse_argv(). Unlike g_spawn_sync(), the G_SPAWN_SEARCH_PATH flag is enabled. Note that G_SPAWN_SEARCH_PATH can have security implications, so consider using g_spawn_sync() directly if appropriate. Possible errors are those from g_spawn_sync() and those from g_shell_parse_argv(). If exit_status is non-NULL, the exit status of the child is stored there as it would be returned by waitpid(); standard UNIX macros such as WIFEXITED() and WEXITSTATUS() must be used to evaluate the exit status. On Windows, please note the implications of g_shell_parse_argv() parsing command_line. Parsing is done according to Unix shell rules, not Windows command interpreter rules. Space is a separator, and backslashes are special. Thus you cannot simply pass a command_line containing canonical Windows paths, like "c:\\program files\\app\\app.exe", as the backslashes will be eaten, and the space will act as a separator. You need to enclose such paths with single quotes, like "'c:\\program files\\app\\app.exe' 'e:\\folder\\argument.txt'".
Executes a child synchronously (waits for the child to exit before returning). All output from the child is stored in standard_output and standard_error, if those parameters are non-NULL. Note that you must set the G_SPAWN_STDOUT_TO_DEV_NULL and G_SPAWN_STDERR_TO_DEV_NULL flags when passing NULL for standard_output and standard_error. If exit_status is non-NULL, the exit status of the child is stored there as it would be returned by waitpid(); standard UNIX macros such as WIFEXITED() and WEXITSTATUS() must be used to evaluate the exit status. Note that this function call waitpid() even if exit_status is NULL, and does not accept the G_SPAWN_DO_NOT_REAP_CHILD flag. If an error occurs, no data is returned in standard_output, standard_error, or exit_status. This function calls g_spawn_async_with_pipes() internally; see that function for full details on the other parameters and details on how these functions work on Windows.
Description