From owner-freebsd-current@FreeBSD.ORG Fri Oct 31 19:28:40 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08CE1065678 for ; Fri, 31 Oct 2008 19:28:40 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id A64EC8FC29 for ; Fri, 31 Oct 2008 19:28:40 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m9VJS2KY093225; Fri, 31 Oct 2008 13:28:03 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <490B5C42.10200@samsco.org> Date: Fri, 31 Oct 2008 13:28:02 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Ed Schouten References: <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl> In-Reply-To: <20081031190614.GQ1165@hoeg.nl> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: Thierry Herbelot , hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 19:28:41 -0000 Ed Schouten wrote: > Hello Theirry, > > * Thierry Herbelot wrote: >> with the following patch on /sbin/init, I have two different behaviours >> depending on the console type (on a i386/32 PC) : >> - on a video console, I see the expected two messages, >> - on a serial console, the messages are not displayed (init silently finishes >> its job and gets to start /etc/rc and everything) >> >> I assume that the writev system call is implemented in >> src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to find an >> explanation. >> >> any taker ? >> >> TfH >> >> PS : this is initially for a RELENG_6 machine, but the code is quite similar >> under RELENG_7 or Current > > Any data written to /dev/console is not multiplexed to all console > devices, but only the first active device in the list. The reason behind > this, is because it adds a real lot of complexity to the console code, > especially related to polling and reading on /dev/console. > > This weekend I'm going to commit a replacement implementation of > /dev/console, which also has this restriction. > The multiplexed console feature is one thing that linux got right. In a corporate setting, you really need both a serial console and a video console in order to effectively manage the machines, as you want to be able to access them both remotely and locally. While it might be hard to build multiplexing into the console driver, do you think it would be possible to layer a multiplexer on top of it, similar to how the kbdmux driver works? Scott