A simple version of Spawn.sync with little-used parameters
removed, taking a command line instead of an argument vector. See
Spawn.sync for full details. command_line will be parsed by
g_shell_parse_argv(). Unlike Spawn.sync, the G_SPAWN_SEARCH_PATH flag
is enabled. Note that G_SPAWN_SEARCH_PATH can have security
implications, so consider using Spawn.sync directly if
appropriate. Possible errors are those from Spawn.sync and those
from g_shell_parse_argv().
If exit_status is non-NULL, the platform-specific exit status of
the child is stored there; see the documentation of
Spawn.checkExitStatus for how to use and interpret this.
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'".
A simple version of Spawn.sync with little-used parameters removed, taking a command line instead of an argument vector. See Spawn.sync for full details. command_line will be parsed by g_shell_parse_argv(). Unlike Spawn.sync, the G_SPAWN_SEARCH_PATH flag is enabled. Note that G_SPAWN_SEARCH_PATH can have security implications, so consider using Spawn.sync directly if appropriate. Possible errors are those from Spawn.sync and those from g_shell_parse_argv().
If exit_status is non-NULL, the platform-specific exit status of the child is stored there; see the documentation of Spawn.checkExitStatus for how to use and interpret this.
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'".