use g_spawn_sync() and g_spawn_async() to define the working directory.
2005-01-04 Dennis Cranston <dennis_cranston@yahoo.com> * gnome-settings-multimedia-keys.c: (execute): use g_spawn_sync() and g_spawn_async() to define the working directory.
This commit is contained in:
parent
9946689e3d
commit
e05cbe044e
2 changed files with 22 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-04 Dennis Cranston <dennis_cranston@yahoo.com>
|
||||
|
||||
* gnome-settings-multimedia-keys.c: (execute): use g_spawn_sync()
|
||||
and g_spawn_async() to define the working directory.
|
||||
|
||||
2004-12-25 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* factory.c: (main): NULL vs. 0.
|
||||
|
|
|
@ -99,12 +99,24 @@ static void
|
|||
execute (char *cmd, gboolean sync)
|
||||
{
|
||||
gboolean retval;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
retval = FALSE;
|
||||
|
||||
if (sync != FALSE)
|
||||
retval = g_spawn_command_line_sync
|
||||
(cmd, NULL, NULL, NULL, NULL);
|
||||
else
|
||||
retval = g_spawn_command_line_async (cmd, NULL);
|
||||
if (g_shell_parse_argv (cmd, &argc, &argv, NULL)) {
|
||||
if (sync != FALSE) {
|
||||
retval = g_spawn_sync (g_get_home_dir (),
|
||||
argv, NULL, G_SPAWN_SEARCH_PATH,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
retval = g_spawn_async (g_get_home_dir (),
|
||||
argv, NULL, G_SPAWN_SEARCH_PATH,
|
||||
NULL, NULL, NULL, NULL);
|
||||
}
|
||||
g_strfreev (argv);
|
||||
}
|
||||
|
||||
if (retval == FALSE)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue