From owner-freebsd-hackers Fri Oct 4 16:11:59 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA29463 for hackers-outgoing; Fri, 4 Oct 1996 16:11:59 -0700 (PDT) Received: from alpo.whistle.com (s204m38.isp.whistle.com [207.76.204.38]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA29453 for ; Fri, 4 Oct 1996 16:11:56 -0700 (PDT) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.7.5/8.7.3) with SMTP id QAA24520 for ; Fri, 4 Oct 1996 16:10:18 -0700 (PDT) Message-ID: <325598E4.167EB0E7@whistle.com> Date: Fri, 04 Oct 1996 16:08:20 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0b6 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: hackers@freebsd.org Subject: Running FreeBSD with NO CONSOLE (AT ALL) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm running freeBSD with no available sio device and no videa cards. (there IS an sio device but it's attached to the modem) this device is htrefore running with no console device. By this I mean that all calls to such routines as cnwrite cnopen etc. do not call any hardware, but return immediatly. because the cn_tab == NULL the only problem I've seen so far is that in exit() there is an unguarded call to p->pg_session->s_ttyp which is NULL. there is a check for p->pg_session->s_ttyvp and the assumption is being made that if s_ttyvp (points to /dev/console's vnode) is valid, then the tty struct in the physical device is also valid. this is not so because the TIOSCTTY ioctl sets them in different places, and one refers to teh device /dev/console, whisch always exists, and the other refers to the tty struct for the underlying physical device. I have hacked the exit code to also check s_ttyp which gets arount that problem, but it leaves open the question "What IS the right answer"? should I 1/ make a dummy console device that supplies a tty struct 2/ make the fix I've made 3/ Other suggestions? Eventually the aim is to be able to run with no console, but in some special case, attach the console to sio0 but only with some special checks. julian