Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: JPEREGRINO@hbsstg.harvard.edu (Another Casualty of Applied Metaphysics) Newsgroups: comp.sys.sun Subject: (Summary) Openwin Cmdtool can't find terminal Keywords: Windows Message-ID: <2429@brchh104.bnr.ca> Date: 17 Apr 91 01:00:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 46 Approved: Sun-Spots@rice.edu X-Original-Date: Mon, 8 Apr 1991 12:02:45 EDT X-Sun-Spots-Digest: Volume 10, Issue 70, message 9 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu In a previous query I wrote : >All of a sudden today, when I start up Openwindows, neither the console >cmdtool nor any other cmdtools show up. A look with ps shows that they >are running (and sucking 23% of the cpu a piece), but have a '?' under the >tty column. So it seems that they cannot access the console. Other >windows (meters, filemgr, etc) come up fine. No problem with sunview >alone, or vanilla X11/R4. > >Someone had this problem back in v9n126, but I can't find a response in >the archives. Thanks to jesse@cs.ualberta.ca, the original submitter re:v9n126, I was put on the correct track. Poffen@sj.ate.slb.com also gave a similar suggestion. Here's What Happened : 1) in a ~/.openwin-init I had two invocations to cmdtool. 2) Cmdtool normally looks for the first available ttyp* terminal. 3) The first two available terminals were two left over from a crashed vanilla X11R4 session. The protection and ownership of the two terminals were still the previous owner's. 4) Cmdtool continuous retried to connect to these two terminals, shooting the cpu usage through the roof. 5) Starting up additional cmdtools was no problem because the bad terminals were now unavailable. 6) After killing the stalled cmdtools, I reset the bad terminals ownership to root and protection to 666. 7) Things were fine. One thing that seemed odd was that the 'w' command showed those two terminals as still being active and owned by the old user. A peek at /etc/utmp showed that they were still referenced in that file. I felt uneasy with that, so I rebooted the machine. The 'moral' is exactly how does cmdtool determine that a terminal is available? Obviously, not by the ownership of the terminal. Does it look in /etc/utmp? If so, how do you clear spurious information from that file? | James Peregrino, Programmer/Analyst | JPEREGRINO@HBSSTG.HARVARD.EDU | | Science & Technology Interest Group | PEREGRIN@HULAW1.BITNET | | Harvard Business School +-----------------------------------+ | Boston, MA 02163 | Standard Disclaimers Provided Upon| | Voice:(617)495-6307, FAX:(617)495-0351 | Request. |