fix ctrl C

This commit is contained in:
clowwindy 2014-06-01 17:20:51 +08:00
parent fd35f1d067
commit 2672a6378e
6 changed files with 10 additions and 5 deletions

View file

@ -66,6 +66,11 @@ def main():
tcp_server.start()
for udp_server in udp_servers:
udp_server.start()
try:
while sys.stdin.read():
pass
except KeyboardInterrupt:
os._exit(0)
if int(config['workers']) > 1:
if os.name == 'posix':