tFix error handling in spawn() - surf - customized build of surf, the suckless … | |
git clone git://src.adamsgaard.dk/surf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit cdc80731fba6ce33bf6803009bf2b838b3be8192 | |
parent b87123ac9b8fb9b0d9b129c1268db97441d395f0 | |
Author: Quentin Rameau <[email protected]> | |
Date: Sun, 22 Nov 2015 13:44:31 +0100 | |
Fix error handling in spawn() | |
Be more specific about process name and exit with an error. | |
Diffstat: | |
M surf.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/surf.c b/surf.c | |
t@@ -643,9 +643,9 @@ spawn(Client *c, const Arg *a) | |
close(ConnectionNumber(dpy)); | |
setsid(); | |
execvp(((char **)a->v)[0], (char **)a->v); | |
- fprintf(stderr, "surf: execvp %s", ((char **)a->v)[0]); | |
+ fprintf(stderr, "%s: execvp %s", argv0, ((char **)a->v)[0]); | |
perror(" failed"); | |
- exit(0); | |
+ exit(1); | |
} | |
} | |