summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-22 13:44:31 +0100
committerQuentin Rameau <quinq@fifth.space>2015-11-22 13:44:31 +0100
commitcdc80731fba6ce33bf6803009bf2b838b3be8192 (patch)
tree09c6856312a88be88dc0d23f48e0958a8c0ea6c2
parentb87123ac9b8fb9b0d9b129c1268db97441d395f0 (diff)
downloadsurf-cdc80731fba6ce33bf6803009bf2b838b3be8192.tar.gz
surf-cdc80731fba6ce33bf6803009bf2b838b3be8192.tar.bz2
surf-cdc80731fba6ce33bf6803009bf2b838b3be8192.zip
Fix error handling in spawn()
Be more specific about process name and exit with an error.
-rw-r--r--surf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/surf.c b/surf.c
index 842b7ea..32c1920 100644
--- a/surf.c
+++ b/surf.c
@@ -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);
}
}