From: Eric S. Raymond Date: Tue, 9 Oct 2012 18:34:40 +0000 (-0400) Subject: A slightly cheaper idle, now that greenlets are gone. X-Git-Tag: 1.11~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2080fc6ad7faa9f9bee1fb3699bfc65528877307;p=irker.git A slightly cheaper idle, now that greenlets are gone. --- diff --git a/irkerd b/irkerd index 6652e92..15c8c7b 100755 --- a/irkerd +++ b/irkerd @@ -44,7 +44,7 @@ CONNECTION_MAX = 200 # To avoid hitting a thread limit version = "1.10" -import sys, getopt, urlparse, time, random, socket +import sys, getopt, urlparse, time, random, socket, signal import threading, Queue, SocketServer import irc.client, logging try: @@ -517,8 +517,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: