Skip to content

Commit 99b2c43

Browse files
committed
Processes restarted if ERROR_PROC_TIMED_OUT or uncaught exception
1 parent 333145c commit 99b2c43

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ProcessScheduler/Process.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
{
9898
if (warning == WARNING_PROC_OVERSCHEDULED)
9999
resetOverSchedWarning();
100+
101+
#ifdef _PROCESS_TIMEOUT_INTERRUPTS
102+
else if (warning == ERROR_PROC_TIMED_OUT)
103+
restart(); // default by restarting it
104+
#endif
100105
}
101106

102107
/*********** PRIVATE *************/

src/ProcessScheduler/Scheduler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ class Scheduler
182182
#ifdef _PROCESS_EXCEPTION_HANDLING
183183
/*
184184
* Handle uncaught Process exceptions from Process process with Exception code e
185+
* By default just restart it
185186
*/
186-
virtual void handleException(Process &process, int e) { };
187+
virtual void handleException(Process &process, int e) { process.restart(); }
187188
#endif
188189
// Inner queue object class to queue scheduler jobs
189190
class QueableOperation

0 commit comments

Comments
 (0)