home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Newsgroups: comp.windows.x
- Subject: Re: xterm phantoms
- Message-ID: <1992Nov18.070243.103@thunder.mcrcim.mcgill.edu>
- Date: 18 Nov 92 07:02:43 GMT
- References: <1eb92mINNdan@life.ai.mit.edu>
- Organization: McGill Research Centre for Intelligent Machines
- Lines: 41
-
- In article <1eb92mINNdan@life.ai.mit.edu>, bruce@maypo.ai.mit.edu (Bruce Walton) writes:
-
- > Often some of our users run X clients on remote sparcstations, and
- > terminate their local X server without shutting it down properly.
-
- When this happens, the operating system is supposed to shut down the
- network connections when the server process dies.
-
- > This happens most often to owners of PC's who run X servers (like
- > MacX or whatever).
-
- Ah, where there isn't any operating system to do the automatic shutdown
- stuff, or when the machine is shut down uncleanly.
-
- One way would be to build a special version of xterm that turns on
- network-layer keepalives. Another would be to just shrug your
- shoulders and say "sorry, you crash your X server by turning off your
- bitty box, you get ghost logins".
-
- > Does anyone know how to recognize these inactive X clients (xterms),
-
- Any utmp entries idle for more than 12 hours are good canididates. :)
-
- > and clear out their utmp entries (without rebooting)?
-
- Make the xterm go away. One of the simplest ways to do this is to make
- the xterm try to do something with the X server. If the machine is up,
- it'll die right away with ECONNRESET; if not, it'll die a few minutes
- later with ETIMEDOUT. Either way, it'll go away, and if it's
- non-buggy, erase the utmp entry first.
-
- As for how to do this, you could just write a character to the relevant
- pty. If it's not a ghost, the character will appear inexplicably in
- the window, but I don't see any good way around that, unless you can
- think of something else you could send that'll force xterm to try to do
- something with the X server.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-