diff options
author | explosion-mental <explosion0mental@gmail.com> | 2022-07-29 18:26:04 -0500 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-08-03 10:38:36 +0100 |
commit | b95937bcfb87a4134b8d925b8f905526d1d9ae78 (patch) | |
tree | 23b04e4f2b77234eafd755462b47df0e813c9adf | |
parent | 9e684a13eb5e4c10acd750edfcdcd86c54eff668 (diff) |
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
-rw-r--r-- | dwm.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1836,9 +1836,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]); } } |