mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 02:41:11 +00:00
Ignore config changes during shutdown
This commit is contained in:
parent
1d05222942
commit
c2983d4c3b
2 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
Rewrite config update code to catch exceptions, ensure that methods
|
||||
are called in the correct order so that -cmdUpdated is always last,
|
||||
and ensure that -cmdUpdated is called when a local defaults update
|
||||
occurs.
|
||||
occurs. Also, ignore config updates while process is quitting.
|
||||
|
||||
2017-12-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
10
EcProcess.m
10
EcProcess.m
|
@ -1423,6 +1423,11 @@ static NSString *noFiles = @"No log files to archive";
|
|||
{
|
||||
return; // Ignore defaults updates during configuration update.
|
||||
}
|
||||
if (YES == ecIsQuitting())
|
||||
{
|
||||
NSLog(@"NSUserDefaults change during process shutdown ... ignored.");
|
||||
return; // Ignore defaults changes during shutdown.
|
||||
}
|
||||
if (nil == configError)
|
||||
{
|
||||
NS_DURING
|
||||
|
@ -5285,6 +5290,11 @@ With two parameters ('maximum' and a number),\n\
|
|||
NSEnumerator *enumerator;
|
||||
NSString *key;
|
||||
|
||||
if (YES == ecIsQuitting())
|
||||
{
|
||||
NSLog(@"Configuration change during process shutdown ... ignored.");
|
||||
return; // Ignore config updates while quitting
|
||||
}
|
||||
newConfig = [NSMutableDictionary dictionaryWithCapacity: 32];
|
||||
/*
|
||||
* Put all values for this application in the cmdConf dictionary.
|
||||
|
|
Loading…
Reference in a new issue