From 49113c1668626c9d6aaec6e015e8a247d96b9489 Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Mon, 10 Oct 2016 23:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0Ctrl-c=E4=B8=AD=E6=96=ADrecv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.rpc/vnrpc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vn.rpc/vnrpc.py b/vn.rpc/vnrpc.py index 83593562..811ca1ab 100644 --- a/vn.rpc/vnrpc.py +++ b/vn.rpc/vnrpc.py @@ -2,12 +2,17 @@ import threading import traceback +import signal import zmq from msgpack import packb, unpackb from json import dumps, loads +# 实现Ctrl-c中断recv +signal.signal(signal.SIGINT, signal.SIG_DFL) + + ######################################################################## class RpcObject(object): """