scd: Fix scd_kick_the_loop.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 3 Mar 2017 11:30:56 +0000 (20:30 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 3 Mar 2017 11:40:06 +0000 (20:40 +0900)
commitf9acc7d18bb90f47dafe7e32ae92f567756d6b12
tree942f45d56aff704c8edce66d915db837be1fe0dc
parent5f6f3f5cae8a95ed469129f9677782c17951dab3
scd: Fix scd_kick_the_loop.

* scd/scdaemon.c (notify_fd): Remove.
(the_event) [W32]: New.
(main_thread_pid) [!W32]: New.
(handle_signal): Handle SIGCONT.
(scd_kick_the_loop): Use signal on UNIX and event on Windows.
(handle_connections): Likewise.
--

Code with CreateEvent is copied from gpg-agent.c.
Code for signal is copied from dkg's gpg-agent-idling in Debian.

GnuPG-bug-id: 2982
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/scdaemon.c