Article View: comp.windows.x
Article #25251Changes to X server to cleanup properly on errors
From: clyde
Date: Tue, 24 Mar 1987 21:16
Date: Tue, 24 Mar 1987 21:16
31 lines
1521 bytes
1521 bytes
Here are some modification to the X server to make it clean things up
before performing an error exit. The cavalier attitude of X about bailing
out on error burned me when I started running the most recent modifications
for SUNs. Xsun remaps the keyboard and if it terminates with an error,
it will leave the keyboard totally screwed up.
(The DisplayDead routine for the SUN resets the keymap).
---- Cut here and apply to X/main.c (not really a patch file) ----
Error (where)
char *where;
{
+ int i;
+
fprintf (stderr, "fatal ");
Notice (where);
if (errdelay)
sleep (errdelay);
+ for (i = firstsock; i < maxsock; i++) {
+ if (socketOn[i])
+ close (i);
+ }
+ DisplayDead ();
exit (1);
}
--
Shouter-To-Dead-Parrots @ Univ. of Texas Computation Center; Austin, Texas
clyde@ngp.cc.utexas.edu; ...!ut-sally!ut-ngp!clyde
"It's a sort of a threat, you see. I've never been very good at them
myself, but I've told they can be very effective."
Technical Details
Message-ID:
<4884@ut-ngp.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!clydeShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!clyde From: clyde@ut-ngp.UUCP Newsgroups: comp.windows.x Subject: Changes to X server to cleanup properly on errors Message-ID: <4884@ut-ngp.UUCP> Date: Tue, 24-Mar-87 16:16:20 EST Article-I.D.: ut-ngp.4884 Posted: Tue Mar 24 16:16:20 1987 Date-Received: Thu, 26-Mar-87 06:10:39 EST Organization: Moose & Squirrel Software Lines: 31 Keywords: X server failure