Date: Tue, 15 Mar 2016 17:06:40 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296912 - stable/10/usr.bin/script Message-ID: <201603151706.u2FH6e2K005842@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Tue Mar 15 17:06:40 2016 New Revision: 296912 URL: https://svnweb.freebsd.org/changeset/base/296912 Log: MFC r296525: Just exit in the child if execve(2) fails. Modified: stable/10/usr.bin/script/script.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/script/script.c ============================================================================== --- stable/10/usr.bin/script/script.c Tue Mar 15 17:05:28 2016 (r296911) +++ stable/10/usr.bin/script/script.c Tue Mar 15 17:06:40 2016 (r296912) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603151706.u2FH6e2K005842>