summaryrefslogtreecommitdiff
path: root/zyklonb.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-02-12 04:05:09 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-02-12 04:05:09 +0100
commit7be995f74a6f656df35eddbbedd79da8e8e124af (patch)
treebb62e2a757f03452a90a2b2a80887c9ebb9e991d /zyklonb.c
parent06b03d336e7cf0b20633045afc5e89ee28e1560c (diff)
downloadxK-7be995f74a6f656df35eddbbedd79da8e8e124af.tar.gz
xK-7be995f74a6f656df35eddbbedd79da8e8e124af.tar.xz
xK-7be995f74a6f656df35eddbbedd79da8e8e124af.zip
ZyklonB: avoid infinite reexec loops
Diffstat (limited to 'zyklonb.c')
-rw-r--r--zyklonb.c3
1 files changed, 3 insertions, 0 deletions
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