diff options
author | explosion-mental <explosion0mental@gmail.com> | 2022-07-29 18:26:04 -0500 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-08-02 18:08:51 +0200 |
commit | 5b2e5e7a4001479e4dc3e245f96e49f7ea0da658 (patch) | |
tree | ae9e4550e77d11241f92847f4828aedcdb02774a /dwm.c | |
parent | 786f6e2a6f8466ad94706781bc93bc6eb6e69512 (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
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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]); } } |