A slightly cheaper idle, now that greenlets are gone.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 9 Oct 2012 18:34:40 +0000 (14:34 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 9 Oct 2012 18:34:40 +0000 (14:34 -0400)
irkerd

diff --git a/irkerd b/irkerd
index 6652e921700e66acfa44d12596960283e2c64c89..15c8c7b6f63128cee7b9563dbc1555f4d5eafca9 100755 (executable)
--- 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: