Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 2010 08:33:57 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r205635 - stable/8/usr.bin/script
Message-ID:  <201003250833.o2P8XvXR022451@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003250833.o2P8XvXR022451>