From owner-freebsd-arch@FreeBSD.ORG Sun May 28 08:18:51 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38CAD16A6A1 for ; Sun, 28 May 2006 08:05:40 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [195.41.46.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id C167043D4C for ; Sun, 28 May 2006 08:05:39 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07cfc.naenxx7.adsl-dhcp.tele.dk [80.160.124.252]) by pfepb.post.tele.dk (Postfix) with ESMTP id 58639A5004F for ; Sun, 28 May 2006 10:05:38 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4S85VDX018116; Sun, 28 May 2006 10:05:31 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 28 May 2006 01:15:18 MDT." <20060528.011518.1306332021.imp@bsdimp.com> Date: Sun, 28 May 2006 10:05:31 +0200 Message-ID: <18115.1148803531@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2006 08:19:05 -0000 In message <20060528.011518.1306332021.imp@bsdimp.com>, "M. Warner Losh" writes : >In message: <16029.1148764704@critter.freebsd.dk> > Poul-Henning Kamp writes: >: 4. The /dev/console device in multi-user mode. >: Emergency output device for critical messages. > >Who is generating these messages? Typically programs in distress. >If so, why not make /dev/console a pipe that syslogd listens to? That is the option which I personally favour. It kills xconsole(1) like applications, and I suspect that would result in whinage, but if we are willing to do that, it is by far the simplest and most sensible solution. >: I would like to redefine the semantics of "/dev/console" as follows: >: if any console-consumers like xconsole(8) are active >: send output to all console-consumers. >: else if a controlling terminal is available >: send output to controlling terminal (that is /dev/tty) >: else >: send output to syslogd, as if generated by printf(9). >: (but do not actually output to low-level console) > >Assuming that this is for #4 /dev/console, that's fine. It is only #4. >The problem that I >have with it being just /dev/tty is that the program opened >/dev/console to tell the world about it, rather than just using >fprintf(stderr,). What does that gain you? As I said in the other email, /dev/tty and stderr is not quite the same thing. /dev/tty has more of the semantics that /dev/console used to have (ie: flash it before their eyes). -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.