mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dix: drop DE_RESET and associated cmdline args
Drop the -reset flag, so Xserver now either simply continues (w/o going through internal reset) when last client disconnected or terminates when -terminate is given. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
45ff802682
commit
f27e12c918
23
dix/main.c
23
dix/main.c
@@ -147,8 +147,7 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
|
||||
alwaysCheckForInput[0] = 0;
|
||||
alwaysCheckForInput[1] = 1;
|
||||
while (1) {
|
||||
serverGeneration++;
|
||||
|
||||
ScreenSaverTime = defaultScreenSaverTime;
|
||||
ScreenSaverInterval = defaultScreenSaverInterval;
|
||||
ScreenSaverBlanking = defaultScreenSaverBlanking;
|
||||
@@ -157,7 +156,7 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
InitBlockAndWakeupHandlers();
|
||||
/* Perform any operating system dependent initializations you'd like */
|
||||
OsInit();
|
||||
if (serverGeneration == 1) {
|
||||
|
||||
CreateWellKnownSockets();
|
||||
for (int i = 1; i < LimitClients; i++)
|
||||
clients[i] = NULL;
|
||||
@@ -165,9 +164,7 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
if (!serverClient)
|
||||
FatalError("couldn't create server client");
|
||||
InitClient(serverClient, 0, (void *) NULL);
|
||||
}
|
||||
else
|
||||
ResetWellKnownSockets();
|
||||
|
||||
clients[0] = serverClient;
|
||||
currentMaxClients = 1;
|
||||
|
||||
@@ -352,19 +349,13 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
|
||||
ClearWorkQueue();
|
||||
|
||||
if (dispatchException & DE_TERMINATE) {
|
||||
CloseWellKnownConnections();
|
||||
}
|
||||
CloseWellKnownConnections();
|
||||
OsCleanup(TRUE);
|
||||
|
||||
OsCleanup((dispatchException & DE_TERMINATE) != 0);
|
||||
|
||||
if (dispatchException & DE_TERMINATE) {
|
||||
ddxGiveUp(EXIT_NO_ERROR);
|
||||
break;
|
||||
}
|
||||
ddxGiveUp(EXIT_NO_ERROR);
|
||||
|
||||
free(ConnectionInfo);
|
||||
ConnectionInfo = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user