pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bafbba5
)
Call _exit() instead of exit() if exec*() fails
author
sin
<sin@2f30.org>
Tue, 11 Nov 2014 18:29:11 +0000
(18:29 +0000)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Wed, 19 Nov 2014 17:52:42 +0000
(18:52 +0100)
exit() will also unwind the atexit() functions. This is bad
because if exec*() fails the process is in an inconsistent state.
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
068fbb3
..
4499be6
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-1190,7
+1190,7
@@
execsh(void) {
signal(SIGALRM, SIG_DFL);
execvp(prog, args);
- exit(EXIT_FAILURE);
+
_
exit(EXIT_FAILURE);
}
void