File: stop_faulty_server.patch

package info (click to toggle)
wdm 1.20-15
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,628 kB
  • ctags: 434
  • sloc: ansic: 1,901; sh: 733; makefile: 469; perl: 29
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: