Add looging at exit statements

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@39222 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-12-08 00:39:16 +00:00
parent 32a1f5ef95
commit 4b2d92d870

View file

@ -993,6 +993,7 @@ NSMutableDictionary *pasteboards = nil;
[connections removeObjectIdenticalTo: connection]; [connections removeObjectIdenticalTo: connection];
if (auto_stop == YES && [connections count] == 0) if (auto_stop == YES && [connections count] == 0)
{ {
NSLog(@"no connection and auto-stop enabled - exiting...");
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
return self; return self;
@ -1066,9 +1067,10 @@ ihandler(int sig)
/* /*
* Prevent recursion. * Prevent recursion.
*/ */
if (beenHere == YES) if (beenHere == YES)
{ {
abort(); NSLog(@"%s:been here - aborting...", __PRETTY_FUNCTION__);
abort();
} }
beenHere = YES; beenHere = YES;
@ -1077,6 +1079,7 @@ if (beenHere == YES)
*/ */
if (sig == SIGTERM) if (sig == SIGTERM)
{ {
NSLog(@"%s:SIGTERM - aborting...", __PRETTY_FUNCTION__);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -1100,11 +1103,13 @@ if (beenHere == YES)
if (action == YES) if (action == YES)
{ {
NSLog(@"%s:action == YES - aborting...", __PRETTY_FUNCTION__);
abort(); abort();
} }
else else
{ {
fprintf(stderr, "gpbs killed by signal %d\n", sig); fprintf(stderr, "gpbs killed by signal %d\n", sig);
NSLog(@"%s:gpbs killed by signal %d\n", __PRETTY_FUNCTION__, sig);
exit(sig); exit(sig);
} }
} }
@ -1451,6 +1456,7 @@ main(int argc, char** argv, char **env)
} }
[[NSRunLoop currentRunLoop] run]; [[NSRunLoop currentRunLoop] run];
NSLog(@"%s:run loop completed - exiting...", __PRETTY_FUNCTION__);
RELEASE(server); RELEASE(server);
RELEASE(pool); RELEASE(pool);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);