projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
786f6e2
)
spawn: reduce 2 lines, change fprintf() + perror() + exit() to die("... :")
author
explosion-mental
<explosion0mental@gmail.com>
Fri, 29 Jul 2022 23:26:04 +0000
(18:26 -0500)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Tue, 2 Aug 2022 16:08:51 +0000
(18:08 +0200)
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
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index c0c3b9b416059a37275c433671f527d36c568c76..61713b733f8e758c3fef6c4187749d7bee5f2ad5 100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-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]);
}
}