(main,close_files,loc_NT_Term,empth_exit):

Add Windows Service to the server.
This includes adding install service and remove service option.
Move the start code from main to separate function.
Make close_files() and loc_NT_Term() global.
Move disassoc() to be earlier in the startup sequence.
This commit is contained in:
Ron Koenderink 2004-12-21 03:10:30 +00:00
parent 99ad950d9c
commit e342a73130
6 changed files with 416 additions and 31 deletions

View file

@ -468,13 +468,19 @@ empth_exit(void)
loc_debug("empth_exit");
if (pThread->bMainThread) {
char buf[20];
/* The main line. Wait forever. */
while (1) {
printf("\nEmpire Server>");
fgets(buf, sizeof(buf), stdin);
if (!strnicmp(buf, "quit", 4))
shutdwn(0);
if (!debug) {
if (service_stopped())
shutdwn(0);
Sleep(3);
} else {
char buf[20];
printf("\nEmpire Server>");
fgets(buf, sizeof(buf), stdin);
if (!strnicmp(buf, "quit", 4))
shutdwn(0);
}
}
} else {
TlsSetValue(loc_GVAR.dwTLSIndex, NULL);