aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--calmwm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/calmwm.c b/calmwm.c
index d90a754..2f3c4e4 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -59,7 +59,7 @@ int
main(int argc, char **argv)
{
char *display_name = NULL;
- char *fallback;
+ char **saved_argv;
int ch, xfd, nflag = 0;
struct pollfd pfd[1];
@@ -69,8 +69,7 @@ main(int argc, char **argv)
conf_init(&Conf);
- fallback = u_argv(argv);
- Conf.wm_argv = u_argv(argv);
+ saved_argv = argv;
while ((ch = getopt(argc, argv, "c:d:nv")) != -1) {
switch (ch) {
case 'c':
@@ -127,9 +126,8 @@ main(int argc, char **argv)
}
x_teardown();
if (cwm_status == CWM_EXEC_WM) {
- u_exec(Conf.wm_argv);
- warnx("'%s' failed to start, starting fallback", Conf.wm_argv);
- u_exec(fallback);
+ execvp(saved_argv[0], saved_argv);
+ warnx("failed to re-exec");
}
return 0;