mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-22 03:11:16 +00:00
Improve autolaunch if a process is misconfigured
This commit is contained in:
parent
f302d89e0b
commit
298c8bda79
2 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2022-11-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* EcCommand.m: When a process shuts down due to a configuration error
|
||||||
|
autolaunch is deferred for 5 minutes because human intervention is
|
||||||
|
unlikely to be rapid (thereiis no point repeatedly trying to autolaunch
|
||||||
|
a misconfigured process).
|
||||||
|
|
||||||
2022-11-01 Richard Frith-Macdonald <rfm@gnu.org>
|
2022-11-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* EcAlarmDestination.h:
|
* EcAlarmDestination.h:
|
||||||
|
|
19
EcCommand.m
19
EcCommand.m
|
@ -2287,6 +2287,17 @@ valgrindLog(NSString *name)
|
||||||
self, [NSThread callStackSymbols]);
|
self, [NSThread callStackSymbols]);
|
||||||
}
|
}
|
||||||
[self resetDelay];
|
[self resetDelay];
|
||||||
|
if (terminationStatusKnown)
|
||||||
|
{
|
||||||
|
if (-3 == terminationStatus) // configuration error
|
||||||
|
{
|
||||||
|
/* Defer the actual launch for 5 minutes since a config error
|
||||||
|
* requires human intervention and is unlikely to be fixed
|
||||||
|
* very quickly.
|
||||||
|
*/
|
||||||
|
deferredDate = [NSDate timeIntervalSinceReferenceDate] + 300.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
startingAlarm = NO;
|
startingAlarm = NO;
|
||||||
startingDate = [NSDate timeIntervalSinceReferenceDate];
|
startingDate = [NSDate timeIntervalSinceReferenceDate];
|
||||||
startingTimer = [NSTimer
|
startingTimer = [NSTimer
|
||||||
|
@ -4362,12 +4373,20 @@ NSLog(@"Problem %@", localException);
|
||||||
|
|
||||||
if (NO == all || [u count] > 0)
|
if (NO == all || [u count] > 0)
|
||||||
{
|
{
|
||||||
|
NSString *r;
|
||||||
|
|
||||||
if ([u count] > 0)
|
if ([u count] > 0)
|
||||||
{
|
{
|
||||||
[s appendFormat:
|
[s appendFormat:
|
||||||
@" %-32.32s is queued waiting for %@\n",
|
@" %-32.32s is queued waiting for %@\n",
|
||||||
[key UTF8String], u];
|
[key UTF8String], u];
|
||||||
}
|
}
|
||||||
|
else if (nil != (r = [l reasonToPreventLaunch]))
|
||||||
|
{
|
||||||
|
[s appendFormat:
|
||||||
|
@" %-32.32s queued: %@\n",
|
||||||
|
[key UTF8String], r];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[s appendFormat:
|
[s appendFormat:
|
||||||
|
|
Loading…
Reference in a new issue