agent: Terminate pinentry process gracefully, by watching socket.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 19 Feb 2019 05:36:50 +0000 (14:36 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 19 Feb 2019 05:36:50 +0000 (14:36 +0900)
commitc395f8315362793409be54aca630ce6e903ea984
tree8db78753af0889c4258b0d1d1c5bd2728d04b059
parent99aa54323f97937613e02d8c2da91544e1fe7bcf
agent: Terminate pinentry process gracefully, by watching socket.

* agent/call-pinentry.c (watch_sock): New.
(do_getpin): Spawn the watching thread.

--

While we don't have npth_cancel (and it's difficult to implement it
correctly), this is a kind of best compromise allowing a thread's
polling when pinentry is active.

GnuPG-bug-id: 2011
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
agent/call-pinentry.c