From 7be995f74a6f656df35eddbbedd79da8e8e124af Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Fri, 12 Feb 2016 04:05:09 +0100 Subject: ZyklonB: avoid infinite reexec loops --- zyklonb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zyklonb.c b/zyklonb.c index 34e6e7e..56a9220 100644 --- a/zyklonb.c +++ b/zyklonb.c @@ -636,6 +636,9 @@ recovery_handler (int signum, siginfo_t *info, void *context) "signal received", signal_name); *g_startup_reason_location = buf; + // Avoid annoying resource intensive infinite loops by sleeping for a bit + (void) sleep (1); + // TODO: maybe pregenerate the path, see the following for some other ways // that would be illegal to do from within a signal handler: // http://stackoverflow.com/a/1024937 -- cgit v1.2.3-70-g09d2