*BSD News Article 20639


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:4927 comp.os.386bsd.misc:918 comp.os.386bsd.development:1199
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.misc,comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!ponderous.cc.iastate.edu!michaelv
From: michaelv@iastate.edu (Michael L. VanLoon)
Subject: pty weirdness in 0.9
Message-ID: <michaelv.747493876@ponderous.cc.iastate.edu>
Sender: news@news.iastate.edu (USENET News System)
Organization: Iowa State University, Ames IA
Date: Wed, 8 Sep 1993 13:11:16 GMT
Lines: 85

I tried mailing this to the netbsd-current-users list, but for some
reason my mail isn't making it onto that list anymore.  Anyway...


I'm running the standard 0.9 distribution, and am noticing some
strangeness with pty's.  I compiled screen 3.5.2 to allocate my pty's
backwards, from ptysf -> ptyp0 (set1 "srqp"; set2 "fedcba9876543210").
Then compiled my kernel to support 65 pty's.  (When I say I did this
stuff for the /dev/pty's, I made sure the /dev/tty's matched also).

I then did a MAKEDEV for pty0 thru pty3.  Upon doing this, I noticed
that ptyv0 sits right in the middle, at the location ptyqf would want
to occupy (6, 31).  Why is this non-consistent device right in the
middle of another series?  What is it for?  Is this like the console
(vga) designated pty or something?  If so, why the hell is it there
(v0 should be at device # 6,96, not at 6,31).  The reason I made the
kernel with 65 pty's, is that I intended to move ptyv0 to 6,64 just to
get it out of the p->s series, and make ptyqf at 6,31 where it belongs.

The strangeness that I notice is this: when I originally only had the
first sixteen pty's (p0 - pf) and v0 at 6,31 and started screen with
four open windows, it would correctly show me as logged into each, at
pf, pe, pd, and pc.  However, when I made all 64 pty's (p-s) and tried
to log into screen with four windows, it let me do it and screen
worked ok, but two things happend:

1) only the last logged in window showed up in the ``w'' display.  I
could use ^AL to log windows in and out, but only the last one I had
logged in would show up, and it always showed up as ptysc (remember
that I'm now using ptysf thru ptysc for logins for screen, ptysc being
the last one allocated).  Here's an example:

>>> log into screen with four windows, allocated sf->sc
root@stingray~# w
11:11am  up 11:54,  3 users,  load average: 1.21, 1.18, 1.16
USER    TTY FROM              LOGIN@  IDLE WHAT
michaelv p1 ponderous        11:19pm  1:02 /usr/libexec//cc1 /var/tmp/cc001951.
michaelv p2 ponderous        11:19pm    17 top
root     sc ponderous:S.3    10:55am    16 -bin/tcsh (tcsh)

>>> log screen window 0 out and back in with ^AL
root@stingray~# w
11:11am  up 11:55,  3 users,  load average: 1.23, 1.19, 1.17
USER    TTY FROM              LOGIN@  IDLE WHAT
michaelv p1 ponderous        11:19pm  1:02 /usr/libexec//cc1 /var/tmp/cc001951.
michaelv p2 ponderous        11:19pm    17 top
root     sc ponderous:S.0    10:55am    16 -bin/tcsh (tcsh)

Notice, it says I'm on the same pty as before, but I'm not.  This
window (S.0) *should* be using ptysf.

2) It seems that when I try to use pty's higher than ptyqf (which was
ptyv0 at 6,31), it sends console messages to the last pty I've
allocated.  Once I started screen with the four windows open like I
indicated, It looks like I'm getting console messages in the last
window opened (S.3).

I experienced the same problem as myself and as root.  This screen is
compiled with 0.9 gcc and libraries.  Also, as a point of information,
I know screen has no problems internally allocating pty's in this
fashion, because we've been doing it this way on Ultrix for years here
at ISU.  Don't know how useful all this information is, but I thought
you might want to look it over.

BTW, for some reason, I keep getting messages from mail to
netbsd-current-users@sun-lamp.cs.berkeley.edu from other people, but
lately whenever *I* mail to that address, I never see my mail making
it to the maillist.  Is it just not echoing it to me, or am I locked
out for some reason?  Thanks for your time...

				--Michael

------------------------------------------------------------------------------
    Michael L. VanLoon  --  michaelv@iastate.edu  --  gg.mlv@isumvs.bitnet
 Iowa State University of Science and Technology -- The way cool place to be!
   Project Vincent Systems Staff, Iowa State University Computation Center
------------------------------------------------------------------------------



-- 
------------------------------------------------------------------------------
  Michael L. VanLoon                           Project Vincent Systems Staff
  michaelv@iastate.edu              Iowa State University Computation Center
------------------------------------------------------------------------------