From owner-freebsd-questions Wed Oct 2 07:59:25 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA13404 for questions-outgoing; Wed, 2 Oct 1996 07:59:25 -0700 (PDT) Received: from jack.colorado.edu (jack.Colorado.EDU [128.138.149.29]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA13396 for ; Wed, 2 Oct 1996 07:59:21 -0700 (PDT) Received: from jack (localhost [127.0.0.1]) by jack.colorado.edu (8.7.6/8.7.3/CNS-4.0p) with SMTP id IAA05746; Wed, 2 Oct 1996 08:59:07 -0600 (MDT) Message-ID: <3252833B.3229@Colorado.EDU> Date: Wed, 02 Oct 1996 08:59:07 -0600 From: "Mark O'Lear" Organization: University of Colorado X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 5.4 sun4m) MIME-Version: 1.0 To: Howard Lew CC: questions@freebsd.org Subject: Re: a trick for /etc/ttys References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Howard Lew wrote: > > On Tue, 1 Oct 1996, Mark O'Lear wrote: > > > This sounds like some other process is using the port at > > the same time (like another regular getty?) You should only > > have one cuaa3/ttyd3 line turned on in your /etc/ttys (one > > or the other, not one of each). Can you send the results Sorry, I should have stated this as: If you want to use com4 with a modem (DCE), only use cuaa3 in /etc/ttys. If you want to use com4 with a direct connect serial device (other than a modem - DTE), only use ttyd3 in /etc/ttys. Since you are using a modem, you should use cuaa3 instead of ttyd3 (this includes using cuaa3 in all comm programs as well.) v/mgetty is expecting that you will use the same device for it to listen on and for you to use with comm programs. Although cuaa3 and ttyd3 are actually the same device, when you opened cuaa3 with a comm program, v/mgetty didn't know that it was the same as ttyd3, so it was still listening, and getting half (or so) of your input. If you open the same device that v/mgetty is listening on, then v/mgetty knows to stop listening until you are done. > > (or report the results) of a 'ps -axw | fgrep a3 | fgrep -v fgrep' > > and 'ps -axw | fgrep d3 | fgrep -v fgrep'. If no one is using > > the modem, you should get one line from the first ps and nothing > > from the second. > > Yes. Only have vgetty running on that line. > > server: {2} ps -axw | fgrep d3 | fgrep -v fgrep > 23934 ?? I 0:00.07 /usr/local/sbin/vgetty ttyd3 > server: {3} > > > > > I have included the relevant part of my /etc/ttys (although I am > > only using mgetty - I cannot imagine the two are that different > > with regards to the locking mechanism), and the output of the > > two ps commands: > > > > /etc/ttys: > > # Serial terminals > > ttyd0 "/usr/libexec/getty std.9600" unknown off secure > > ttyd1 "/usr/libexec/getty std.9600" unknown off secure > > ttyd2 "/usr/libexec/getty std.9600" unknown off secure > > ttyd3 "/usr/libexec/getty std.9600" unknown off secure > > # Modems > > cuaa0 "/usr/local/sbin/mgetty -k 1024 -n 1 /dev/cuaa0" > > unknown on insecure > > cuaa1 "/usr/local/sbin/mgetty -k 1024 -n 1 /dev/cuaa1" > > unknown on insecure > > cuaa2 "/usr/local/sbin/mgetty -k 1024 -n 1 /dev/cuaa2" > > unknown on insecure > > cuaa3 "/usr/local/sbin/mgetty -k 1024 -n 1 /dev/cuaa3" > > unknown on insecure > > > > I'm not sure what -k 1024 -n 1 means, but here's mine: -k 1024 means don't accept any faxes if the directory for incoming faxes has less than 1024K of free space. I forgot what the -n 1 means, and my man pages for mgetty seem to be lost. > > # > # @(#)ttys 5.1 (Berkeley) 4/17/89 > # > # name getty type status comments > # > # This entry needed for asking password when init goes to single-user mode > # If you want to be asked for password, change "secure" to "insecure" here > console none unknown off secure > # > ttyv0 "/usr/libexec/getty Pc" cons25 on secure > # Virtual terminals > ttyv1 "/usr/libexec/getty Pc" cons25 on secure > ttyv2 "/usr/libexec/getty Pc" cons25 on secure > ttyv3 "/usr/X11R6/bin/xdm" xterm on secure > # Serial terminals > ttyd0 "/usr/libexec/getty std.9600" unknown off secure > ttyd1 "/usr/libexec/getty std.9600" unknown off secure > ttyd2 "/usr/libexec/getty std.9600" unknown off secure > ttyd3 "/usr/local/sbin/vgetty" unknown on insecure > # Pseudo terminals > ttyp0 none network > ttyp1 none network > ... > > > > > P.S. Did you mean to leave off the freebsd-questions list in > > your CC:? > > nope... I guess it got dropped by accident. I'll put it back in the cc: > list and see if we can get more input on this... -- Mark O'Lear \ e-mail: Mark.Olear@Colorado.EDU University of Colorado \ phone: (303) 492-3798 Telecomm. Svcs. (CB 313) \ fax: (303) 492-5105 Boulder, CO 80309 \