From 1b71124f849f5eecf451087e7ae9a9768cb09836 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 5 Oct 2012 11:28:54 -0400 Subject: [PATCH] Make the main process idle loop slightly less expensive. --- irkerd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/irkerd b/irkerd index 698aa36..877da0e 100755 --- a/irkerd +++ b/irkerd @@ -58,7 +58,7 @@ except ImportError: CONNECTION_MAX = 200 green_threads = False -import sys, getopt, urlparse, time, random, socket +import sys, getopt, urlparse, time, random, socket, signal import threading, Queue, SocketServer import irc.client, logging try: @@ -486,8 +486,7 @@ if __name__ == '__main__': server.setDaemon(True) server.start() try: - while True: - time.sleep(10) + signal.pause() except KeyboardInterrupt: raise SystemExit(1) except socket.error, e: -- 2.26.2