Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!theory.cs.cmu.edu!tsf From: tsf@theory.cs.cmu.edu (Timothy Freeman) Newsgroups: comp.windows.x Subject: Telling X not to reset when there are no connections Message-ID: <1031@theory.cs.cmu.edu> Date: Sun, 19-Apr-87 17:18:24 EST Article-I.D.: theory.1031 Posted: Sun Apr 19 17:18:24 1987 Date-Received: Sun, 19-Apr-87 22:43:54 EST Organization: Carnegie-Mellon University, CS/RI Lines: 99 The X server resets itself whenever it has no connections. This is a nuisance when the server is started up by interactively running xinit, so I made an option "-R" that tells the server not to reset when it has no connections. Here are the diffs to X/main.c: *** main.c Sun Apr 19 17:47:42 1987 --- newmain.c Sun Apr 19 17:26:52 1987 *************** *** 83,88 static short default_mono = 0; /* Force monochrome */ static short default_blank = 0; /* Blank video preferred */ static ColorDef basecolors[2] = {{BlackPixel, 0, 0, 0x8000}, {WhitePixel, 0xff00, 0xff00, 0xff00}}; static ColorDef randomcolors[2] = {{BlackPixel, 0, 0, 0}, --- 83,90 ----- static short default_mono = 0; /* Force monochrome */ static short default_blank = 0; /* Blank video preferred */ + static short reset_when_no_connects = 1; /* Reset the server when there are no connections? */ + static ColorDef basecolors[2] = {{BlackPixel, 0, 0, 0x8000}, {WhitePixel, 0xff00, 0xff00, 0xff00}}; static ColorDef randomcolors[2] = {{BlackPixel, 0, 0, 0}, *************** *** 171,176 default_repeat = 0; } else if (strcmp (arg, "r") == 0) { default_repeat = 1; } else if (strcmp (arg, "-s") == 0 && i < argc) { default_savertime = atoi (argv[i]); if (default_savertime == 0) Usage (); --- 173,184 ----- default_repeat = 0; } else if (strcmp (arg, "r") == 0) { default_repeat = 1; + } else if (strcmp (arg, "R") == 0) { + reset_when_no_connects = 1; + i++; + } else if (strcmp (arg, "-R") == 0) { + reset_when_no_connects = 0; + i++; } else if (strcmp (arg, "-s") == 0 && i < argc) { default_savertime = atoi (argv[i]); if (default_savertime == 0) Usage (); *************** *** 202,208 Usage () { printf("usage: X [option ...] \n"); ! printf("options: -a #, c #, -c, -f #, -l, l, m, -p #, -r, r, -s #, -t #, v, -v\n"); printf(" -0 -1 -D \n"); exit(1); } --- 210,216 ----- Usage () { printf("usage: X [option ...] \n"); ! printf("options: -a #, c #, -c, -f #, -l, l, m, -p #, -r, r, -R, R, -s #, -t #, v, -v\n"); printf(" -0 -1 -D \n"); printf("R means to reset the server when there are no connections; -R means not to.\n"); exit(1); *************** *** 204,209 printf("usage: X [option ...] \n"); printf("options: -a #, c #, -c, -f #, -l, l, m, -p #, -r, r, -s #, -t #, v, -v\n"); printf(" -0 -1 -D \n"); exit(1); } --- 212,218 ----- printf("usage: X [option ...] \n"); printf("options: -a #, c #, -c, -f #, -l, l, m, -p #, -r, r, -R, R, -s #, -t #, v, -v\n"); printf(" -0 -1 -D \n"); + printf("R means to reset the server when there are no connections; -R means not to.\n"); exit(1); } *************** *** 656,662 Free_client_resources (i); Deal_with_movement (); /* if nobody is left, clean up after them */ ! if (maxsock == firstsock) Restore_root (); } --- 665,671 ----- Free_client_resources (i); Deal_with_movement (); /* if nobody is left, clean up after them */ ! if ((maxsock == firstsock) && reset_when_no_connects) Restore_root (); }