summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-03-15 17:06:40 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-03-15 17:06:40 +0000
commitd59e9e148b54c5a68f0d3adaa07462d8057207d0 (patch)
tree08723b219feebf04e37175924792e540a3798a95 /usr.bin
parent9f9f925e251c4a438f048762406daa5dee3f7900 (diff)
downloadFreeBSD-src-d59e9e148b54c5a68f0d3adaa07462d8057207d0.zip
FreeBSD-src-d59e9e148b54c5a68f0d3adaa07462d8057207d0.tar.gz
MFC r296525:
Just exit in the child if execve(2) fails.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/script/script.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 1fb79f3..c990849 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -80,7 +80,6 @@ static struct termios tt;
static void done(int) __dead2;
static void doshell(char **);
-static void fail(void);
static void finish(void);
static void record(FILE *, char *, size_t, int);
static void consume(FILE *, off_t, char *, int);
@@ -342,14 +341,7 @@ doshell(char **av)
execl(shell, shell, "-i", (char *)NULL);
warn("%s", shell);
}
- fail();
-}
-
-static void
-fail(void)
-{
- (void)kill(0, SIGTERM);
- done(1);
+ exit(1);
}
static void
OpenPOWER on IntegriCloud