<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 5b80984e4cb952993cde96d5890ea83087fc8e0d Mon Sep 17 00:00:00 2001
From: Slaven Rezic &lt;slaven@rezic.de&gt;
Date: Sat, 25 Nov 2017 09:57:00 +0100
Subject: [PATCH] timeout on inactivity (RT #123736)

---
 test.pl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test.pl b/test.pl
index 8436a47..9664e6b 100644
--- a/test.pl
+++ b/test.pl
@@ -91,9 +91,16 @@ $gc = getGC($win, $font);
 
 $x-&gt;MapWindow($win);
 
+$SIG{ALRM} = sub { die "Timeout" };
+alarm(30);
 while (1)
   {
-    $x-&gt;handle_input until %e = $x-&gt;dequeue_event;
+    eval { $x-&gt;handle_input until %e = $x-&gt;dequeue_event; };
+    if ($@)
+      {
+	last if $@ =~ /Timeout/;
+        die $@;
+      }
     if ($e{name} eq "Expose")
       {
 	next unless $e{count} == 0;
-- 
2.1.4

</pre></body></html>