summaryrefslogtreecommitdiff
path: root/openbox/openbox.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-20 07:48:59 +0000
committerDana Jansens <danakj@orodu.net>2003-03-20 07:48:59 +0000
commit8758271498db8de722b5a5af04427b21e834bef3 (patch)
tree0e16b879504edd8f15fee5e216e0eabac3430ccd /openbox/openbox.c
parent26f66bc932be6313e1fb71d73e60ba5667276ac0 (diff)
restart and catch errors appropriately
Diffstat (limited to 'openbox/openbox.c')
-rw-r--r--openbox/openbox.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 886285c7..017eb184 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -176,16 +176,20 @@ int main(int argc, char **argv)
XCloseDisplay(ob_display);
if (ob_restart) {
+ ob_restart_path = "";
if (ob_restart_path != NULL) {
int argcp;
char **argvp;
- GError *err;
+ GError *err = NULL;
/* run other shit */
- if (g_shell_parse_argv(ob_restart_path, &argcp, &argvp, &err))
+ if (g_shell_parse_argv(ob_restart_path, &argcp, &argvp, &err)) {
execvp(argvp[0], argvp);
-
- g_strfreev(argvp);
+ g_strfreev(argvp);
+ } else {
+ g_warning("failed to execute '%s': %s", ob_restart_path,
+ err->message);
+ }
}
/* re-run me */