summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1994-06-01 05:14:19 +0000
committerasami <asami@FreeBSD.org>1994-06-01 05:14:19 +0000
commitc0c88c1f41fad95d863cc05c7703598d92d5f283 (patch)
tree38c903d03c54ab181917d207b47a2f695649c59e /usr.sbin/pkg_install
parentd9f33e67ba6d8aaa2b049459d2455b3301dc5c3f (diff)
downloadFreeBSD-src-c0c88c1f41fad95d863cc05c7703598d92d5f283.zip
FreeBSD-src-c0c88c1f41fad95d863cc05c7703598d92d5f283.tar.gz
Close /dev/tty that is opened in y_or_n()...this is called many times
so it will run out of ptys if not properly closed.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/lib/msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/lib/msg.c b/usr.sbin/pkg_install/lib/msg.c
index 12a2ff0..9e3e8ef 100644
--- a/usr.sbin/pkg_install/lib/msg.c
+++ b/usr.sbin/pkg_install/lib/msg.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: msg.c,v 1.2 1993/09/03 23:01:15 jkh Exp $";
+static const char *rcsid = "$Id: msg.c,v 1.3 1994/04/05 14:08:47 jkh Exp $";
#endif
/*
@@ -96,6 +96,7 @@ y_or_n(Boolean def, const char *msg, ...)
if (ch == '\n')
ch = (def) ? 'Y' : 'N';
}
+ fclose(tty) ;
return (ch == 'Y') ? TRUE : FALSE;
}
OpenPOWER on IntegriCloud