Home GnuPG
Diffusion GnuPG 031e3fa7b9a6

scd: Wake up the select when new USB scan.
031e3fa7b9a6Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

scd: Wake up the select when new USB scan.

* scd/scdaemon.c (update_fdset_for_usb): Wake up the select(2).
(handle_connections): Use a kind of "self-pipe" technique.

Use pipe to wake up select(2). If UNIX-only, signal could be used. For
portability, "self-pipe" is better, here. Setup for non-blocking for
pipe fds are not needed, because speed of USB device insertion is
limited by human physical interaction; No one can do hundreds of
device insertion/removal-s per second.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jan 27 2017, 6:34 AM
Parents
rG881dcdfd84eb: scd: Only submit apdu_get_status when needed.
Branches
Unknown
Tags
Unknown