Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2001 01:38:17 -0400 (EDT)
From:      Cyrus Rahman <cr@jcmax.com>
To:        mike@FreeBSD.org
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/18181: Getty can fail to observe :de: specification unle
Message-ID:  <XFMail.010722013817.cr@plasma.jcmax.com>
In-Reply-To: <200107220147.f6M1l1558839@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22-Jul-01 mike@FreeBSD.org wrote:
> Synopsis: Getty can fail to observe :de: specification unless present in
> default
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: mike
> State-Changed-When: Sat Jul 21 18:46:47 PDT 2001
> State-Changed-Why: 
> 
> Does this problem still occur in newer versions of FreeBSD,
> such as 4.3-RELEASE?
> 
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18181

As I recall, the problem is that the code (in main.c):

        for (;;) {
                /*
                 * 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);

expects to find the correct delay value in DE.  However, this is no longer set
this early in the loop, since the code that would load it with the value
from gettytab:

                gettable(tname, tabent);
                setdefaults();

has been moved into setttymode(), which isn't run until after the test.

Although not elegant, I fixed the problem by adding an extra

                gettable(tname, tabent);
                setdefaults();

at the top of the loop before the first lookup of DE.

Inspection of the latest copy of getty/main.c indicates that the problem has
not been corrected in 1.28.2.3.

Cyrus


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010722013817.cr>