From owner-freebsd-bugs Sun Apr 23 14:50: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id CBA6C37B624 for ; Sun, 23 Apr 2000 14:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA47531; Sun, 23 Apr 2000 14:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from vortex.jcmax.com (vortex.jcmax.com [204.69.248.1]) by hub.freebsd.org (Postfix) with ESMTP id 09E0D37BA79 for ; Sun, 23 Apr 2000 14:48:05 -0700 (PDT) (envelope-from cr@jcmax.com) Received: from plasma.jcmax.com (plasma.jcmax.com [204.69.248.13]) by vortex.jcmax.com (8.9.3/8.9.3) with ESMTP id RAA06845 for ; Sun, 23 Apr 2000 17:48:04 -0400 (EDT) (envelope-from cr@jcmax.com) Received: (from cr@localhost) by plasma.jcmax.com (8.9.3/8.9.3) id RAA26544; Sun, 23 Apr 2000 17:48:03 -0400 (EDT) (envelope-from cr@jcmax.com) Message-Id: <200004232148.RAA26544@plasma.jcmax.com> Date: Sun, 23 Apr 2000 17:48:03 -0400 (EDT) From: Cyrus Rahman Reply-To: cr@jcmax.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/18181: Getty can fail to observe :de: specification unless present in default Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18181 >Category: bin >Synopsis: Getty can fail to observe :de: specification unless present in default >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 23 14:50:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Cyrus Rahman >Release: FreeBSD 4.0-STABLE i386 >Organization: >Environment: >Description: Getty does not process the :de: delay unless it is present in the default terminal class. This is somewhat annoying, since a 15 second delay can be most useful with a modem, but is generally unappreciated on the console. Here's what happens: As getty enters its main loop, it encounters the following code: /* * if a delay was specified then sleep for that * number of seconds before writing the initial prompt */ if (first_sleep && DE) { sleep(DE); /* remove any noise */ (void)tcflush(STDIN_FILENO, TCIOFLUSH); } first_sleep = 0; setttymode(tname, 0); Until the setttymode(), only the default gettytab terminal class has been loaded. Setttymode() contains the following code: gettable(tname, tabent); if (OPset || EPset || APset) APset++, OPset++, EPset++; setdefaults(); After which the correct terminal class is loaded. >How-To-Repeat: Set up hylafax to run a getty(8) upon detection of a data call, invoking getty via "dly.152000 -", where the dly.152000 class has a non-null de field value. Watch the connection process and observe that getty did not wait as required. Notice that for once this bug isn't in hylafax. >Fix: Initializing the global class values from within setttymode() is not very pretty, but was put there to move the tty-mode specific processing of the APset and other flags there. Gettable() should be moved to the top of the main loop, followed by a setdefaults(). >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message