[hackers] [surf] Fix error handling in spawn() || Quentin Rameau
commit cdc80731fba6ce33bf6803009bf2b838b3be8192
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sun Nov 22 13:44:31 2015 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Sun Nov 22 13:44:31 2015 +0100
Fix error handling in spawn()
Be more specific about process name and exit with an error.
diff --git a/surf.c b/surf.c
index 842b7ea..32c1920 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -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);
}
}
Received on Sun Nov 22 2015 - 15:35:13 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 22 2015 - 15:36:20 CET