chiark / gitweb /
agent: Allow threads to interrupt main select loop with SIGCONT.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 1 Nov 2016 04:45:23 +0000 (00:45 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 3 Jan 2017 20:39:52 +0000 (20:39 +0000)
commit9326d2a7de29595657fdc1997705a5d8739b8f71
tree8d8afc2c773a776ebb29bdaac80d656c319433dc
parentc224dda498a321a715e9f1a5e61c371d289f8657
agent: Allow threads to interrupt main select loop with SIGCONT.

* agent/gpg-agent.c (interrupt_main_thread_loop): New function on
non-windows platforms, allows other threads to interrupt the main loop
if there's something that the main loop might be interested in.

--

For example, the main loop might be interested in changes in program
state that affect the timers it expects to see.

I don't know how to do this on Windows platforms, but i welcome any
proposed improvements.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Gbp-Pq: Topic gpg-agent-idling
Gbp-Pq: Name 0002-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch
agent/agent.h
agent/gpg-agent.c