Introduction
Introduction Statistics Contact Development Disclaimer Help
spawn: reduce 2 lines, change fprintf() + perror() + exit() to die("... :") - d…
git clone git://git.suckless.org/dwm
Log
Files
Refs
README
LICENSE
---
commit 5b2e5e7a4001479e4dc3e245f96e49f7ea0da658
parent 786f6e2a6f8466ad94706781bc93bc6eb6e69512
Author: explosion-mental <[email protected]>
Date: Fri, 29 Jul 2022 18:26:04 -0500
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:
M dwm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git 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]);
}
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.