Skip to content
Snippets Groups Projects
Commit 5b2e5e7a authored by explosion-mental's avatar explosion-mental Committed by Hiltjo Posthuma
Browse files

spawn: reduce 2 lines, change fprintf() + perror() + exit() to die("... :")

when calling die and the last character of the string corresponds to
':', die() will call perror(). See util.c

Also change EXIT_SUCCESS to EXIT_FAILURE
parent 786f6e2a
Branches
No related tags found
No related merge requests found
......@@ -1653,9 +1653,7 @@ spawn(const Arg *arg)
close(ConnectionNumber(dpy));
setsid();
execvp(((char **)arg->v)[0], (char **)arg->v);
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
perror(" failed");
exit(EXIT_SUCCESS);
die("dwm: execvp '%s' failed:", ((char **)arg->v)[0]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment