svn commit: r296912 - stable/10/usr.bin/script

Bryan Drewery bdrewery at FreeBSD.org
Tue Mar 15 17:06:41 UTC 2016


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


More information about the svn-src-all mailing list