pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b87123a
)
Fix error handling in spawn()
author
Quentin Rameau
<quinq@fifth.space>
Sun, 22 Nov 2015 12:44:31 +0000
(13:44 +0100)
committer
Quentin Rameau
<quinq@fifth.space>
Sun, 22 Nov 2015 12:44:31 +0000
(13:44 +0100)
Be more specific about process name and exit with an error.
surf.c
patch
|
blob
|
history
diff --git
a/surf.c
b/surf.c
index
842b7ea
..
32c1920
100644
(file)
--- 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
);
}
}