In the parent process, close the slave file descriptor at the earliest
authorChris Pressey <cpressey@dragonflybsd.org>
Tue, 1 Mar 2005 21:20:17 +0000 (21:20 +0000)
committerChris Pressey <cpressey@dragonflybsd.org>
Tue, 1 Mar 2005 21:20:17 +0000 (21:20 +0000)
commitc8380b0f459d281673562ce06f4efed7fa7fe3fd
tree9007b50daf6fa402e4a17ff6caee819585d809d1
parent9814cb624dba6a59b53dc85ac412ae6e4ec3e3a7
In the parent process, close the slave file descriptor at the earliest
opportunity (just after we fork.)  This is not strictly necessary, but
it is good programming practice; and, since this program is one of the
only users of openpty(3) in the tree, it behooves us to set a good
example here.
usr.bin/script/script.c