瀏覽代碼

Set EV_PERSIST flag on signal events with Libevent < 2.0.

Fix for bug 1007.
Nick Mathewson 16 年之前
父節點
當前提交
94e8c34cb7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/compat_libevent.c

+ 1 - 1
src/common/compat_libevent.c

@@ -131,7 +131,7 @@ struct event *
 tor_evsignal_new(struct event_base * base, int sig,
                  void (*cb)(int, short, void *), void *arg)
 {
-  return tor_event_new(base, sig, EV_SIGNAL, cb, arg);
+  return tor_event_new(base, sig, EV_SIGNAL|EV_PERSIST, cb, arg);
 }
 /** Work-alike replacement for event_free() on pre-Libevent-2.0 systems. */
 void