]> Dogcows Code - chaz/openbox/commitdiff
restart and catch errors appropriately
authorDana Jansens <danakj@orodu.net>
Thu, 20 Mar 2003 07:48:59 +0000 (07:48 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 20 Mar 2003 07:48:59 +0000 (07:48 +0000)
openbox/openbox.c

index 886285c72cffd639d6db7c9b8f1d2325e8d07470..017eb184115bdd3231634269fcdd34380811f8c5 100644 (file)
@@ -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 */
This page took 0.022063 seconds and 4 git commands to generate.