src/rcxml.c: parse <keybind>

This commit is contained in:
Johan Malm 2020-06-19 22:00:22 +01:00
parent f6578248c0
commit 158f42d1e8
11 changed files with 108 additions and 50 deletions

View file

@ -1,3 +1,4 @@
labwc_sources += files(
'buf.c',
'spawn.c',
)

22
src/common/spawn.c Normal file
View file

@ -0,0 +1,22 @@
#include <glib.h>
void spawn_async_no_shell(char const *command)
{
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 | G_SPAWN_DO_NOT_REAP_CHILD,
NULL, NULL, NULL, &err);
if (err) {
g_message("%s", err->message);
g_error_free(err);
}
g_strfreev(argv);
}