aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/termcap.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-06-11 08:02:09 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-06-11 08:02:09 +0000
commitbcb0ff98875adab04615a40cc38319daf33b5a8b (patch)
tree2573abdf1fcae2b4f867cdfc6fae930d564a4114 /usr.sbin/sysinstall/termcap.c
parent3ee8cec8545ee16d241b11023e0ff74015b8c6f1 (diff)
Notes
Diffstat (limited to 'usr.sbin/sysinstall/termcap.c')
-rw-r--r--usr.sbin/sysinstall/termcap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c
index a6b643b108ae..834ea0f5b954 100644
--- a/usr.sbin/sysinstall/termcap.c
+++ b/usr.sbin/sysinstall/termcap.c
@@ -33,8 +33,11 @@ set_termcap(void)
term = getenv("TERM");
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
- if (getpid() != 1)
+ if (getpid() != 1) {
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (DebugFD < 0)
+ DebugFD = open("/dev/null", O_RDWR, 0);
+ }
if (stat < 0) {
if (!term) {