File: stop_faulty_server.patch

package info (click to toggle)
wdm 1.0-7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,368 kB
  • ctags: 527
  • sloc: ansic: 1,805; sh: 647; makefile: 454; perl: 31
file content (24 lines) | stat: -rw-r--r-- 823 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- xdm/dm.c	Sun Oct  6 07:18:56 1996
+++ src/dm.c	Sat Jan  2 09:10:47 1999
@@ -488,7 +488,7 @@
 		    RestartDisplay (d, TRUE);
 		break;
 	    case waitCompose (SIGTERM,0,0):
-		d->startTries = 0;
+              /* d->startTries = 0; */
 		Debug ("Display exited on SIGTERM\n");
 		if (d->displayType.origin == FromXDMCP || d->status == zombie)
 		    StopDisplay(d);
@@ -529,7 +529,11 @@
 		if (d->pid != -1)
 		{
 		    Debug ("Terminating session pid %d\n", d->pid);
-		    TerminateProcess (d->pid, SIGTERM);
+                    if (++d->startTries >= d->startAttempts) {
+                      LogError ("Display %s is being disabled\n", d->name);
+                      StopDisplay (d);
+                    } else
+                      TerminateProcess (d->pid, SIGTERM);
 		}		
 		break;
 	    case notRunning: