svn commit: r205635 - stable/8/usr.bin/script

Ed Schouten ed at FreeBSD.org
Thu Mar 25 08:33:57 UTC 2010


Author: ed
Date: Thu Mar 25 08:33:56 2010
New Revision: 205635
URL: http://svn.freebsd.org/changeset/base/205635

Log:
  MFC r205008 and 205009:
  
    Make script(1) a little less broken.
  
    Close the file descriptor to the TTY. There is no reason why the parent
    process should keep track of the descriptor. This ensures that the
    application inside properly drains the TTY during exit(2).
  
    Reported by:  alfred

Modified:
  stable/8/usr.bin/script/script.c
Directory Properties:
  stable/8/usr.bin/script/   (props changed)

Modified: stable/8/usr.bin/script/script.c
==============================================================================
--- stable/8/usr.bin/script/script.c	Thu Mar 25 02:14:04 2010	(r205634)
+++ stable/8/usr.bin/script/script.c	Thu Mar 25 08:33:56 2010	(r205635)
@@ -158,6 +158,7 @@ main(int argc, char *argv[])
 	}
 	if (child == 0)
 		doshell(argv);
+	close(slave);
 
 	if (flushtime > 0)
 		tvp = &tv;


More information about the svn-src-all mailing list