labwc/src/common/spawn.c

23 lines
426 B
C
Raw Normal View History

2020-06-19 22:00:22 +01:00
#include <glib.h>
void
spawn_async_no_shell(char const *command)
2020-06-19 22:00:22 +01:00
{
GError *err = NULL;
gchar **argv = NULL;
g_shell_parse_argv((gchar *)command, NULL, &argv, &err);
if (err) {
g_message("%s", err->message);
g_error_free(err);
return;
}
g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL,
&err);
2020-06-19 22:00:22 +01:00
if (err) {
g_message("%s", err->message);
g_error_free(err);
}
g_strfreev(argv);
}