From owner-freebsd-doc@FreeBSD.ORG Wed Jun 15 21:50:15 2005 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D38A316A41C for ; Wed, 15 Jun 2005 21:50:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD1BE43D49 for ; Wed, 15 Jun 2005 21:50:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j5FLoFDA015487 for ; Wed, 15 Jun 2005 21:50:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j5FLoFgM015484; Wed, 15 Jun 2005 21:50:15 GMT (envelope-from gnats) Resent-Date: Wed, 15 Jun 2005 21:50:15 GMT Resent-Message-Id: <200506152150.j5FLoFgM015484@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Lightfoot Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A6E616A41C for ; Wed, 15 Jun 2005 21:44:05 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1124943D4C for ; Wed, 15 Jun 2005 21:44:05 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j5FLi4nq052314 for ; Wed, 15 Jun 2005 21:44:04 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j5FLi43R052313; Wed, 15 Jun 2005 21:44:04 GMT (envelope-from nobody) Message-Id: <200506152144.j5FLi43R052313@www.freebsd.org> Date: Wed, 15 Jun 2005 21:44:04 GMT From: Chris Lightfoot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: docs/82296: ttys(5) man page misleads about use for non-getty processes X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2005 21:50:16 -0000 >Number: 82296 >Category: docs >Synopsis: ttys(5) man page misleads about use for non-getty processes >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 15 21:50:15 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Chris Lightfoot >Release: 5.2.1-RELEASE-p13 >Organization: >Environment: FreeBSD very.unfortu.net 5.2.1-RELEASE-p13 FreeBSD 5.2.1-RELEASE-p13 #5: Wed Dec 29 16:45:15 GMT 2004 james@very.unfortu.net:/usr/obj/usr/src/sys/VERY i386 >Description: The ttys(5) man page states in respect of each line of /etc/ttys, The first field is normally the name of the terminal special file as it is found in /dev. However, it can be any arbitrary string when the asso- ciated command is not related to a tty. However, this is not true -- the new_session command in init.c will drop any /etc/ttys line whose first field does not give the name of a file in /dev which can be opened: (line 937 et seq) /* * Attempt to open the device, if we get "device not configured" * then don't add the device to the session list. */ if ((fd = open(sp->se_device, O_RDONLY | O_NONBLOCK, 0)) < 0) { if (errno == ENXIO || errno == ENOENT) { free_session(sp); return (0); } } else close(fd); The same error is present in ttys(5) in the 5.4-RC2 release in respect of the init source code on that release. >How-To-Repeat: Obey advice of man page to run a non-getty process from init; observe that it doesn't work. >Fix: Change the man page or the code in init.c. The latter looks harder since I don't think init.c knows whether a given line refers to a getty process or not. >Release-Note: >Audit-Trail: >Unformatted: