diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-20 01:53:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-20 01:53:38 +0000 |
| commit | 396d559b3fe6545a2190bfbababcf49c02ff7127 (patch) | |
| tree | b6f1709e68f672da177c83943ac7e325626ae5ac /openbox/openbox.c | |
| parent | de307661b6ce96e61e20a123b00297dbc57d5d85 (diff) | |
can restart now
Diffstat (limited to 'openbox/openbox.c')
| -rw-r--r-- | openbox/openbox.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c index 025a16a7..886285c7 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -35,6 +35,9 @@ #ifdef HAVE_LOCALE_H # include <locale.h> #endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif #include <X11/cursorfont.h> @@ -174,9 +177,20 @@ int main(int argc, char **argv) if (ob_restart) { if (ob_restart_path != NULL) { + int argcp; + char **argvp; + GError *err; + /* run other shit */ + if (g_shell_parse_argv(ob_restart_path, &argcp, &argvp, &err)) + execvp(argvp[0], argvp); + + g_strfreev(argvp); } + /* re-run me */ + execvp(argv[0], argv); /* try how we were run */ + execlp("ob3", "ob3", NULL); /* try this as a last resort */ } return 0; |
