aboutsummaryrefslogtreecommitdiffstats
path: root/src/keysign.c
diff options
context:
space:
mode:
authorColin Watson <[email protected]>2017-09-16 03:16:45 +0000
committerWerner Koch <[email protected]>2017-10-04 15:26:39 +0000
commitb5b996b1a142abb90296f5feadf0b5b19c59f738 (patch)
treebae96d5b1fea3c7f799bd36dd4d7a4c850a0abdd /src/keysign.c
parentRegister DCO for Colin Watson. (diff)
downloadgpgme-b5b996b1a142abb90296f5feadf0b5b19c59f738.tar.gz
gpgme-b5b996b1a142abb90296f5feadf0b5b19c59f738.zip
core: Restore get_max_fds optimization on Linux
* src/posix-io.c (get_max_fds): Restore Linux optimization, this time using open/getdents/close rather than opendir/readdir/closedir. -- opendir/readdir/closedir may allocate/free memory, and aren't required to do so in an async-signal-safe way. On the other hand, opening /proc/self/fd directly and iterating over it using getdents is safe. (getdents is not strictly speaking documented to be async-signal-safe because it's not in POSIX. However, the Linux implementation is essentially just a souped-up read. Python >= 3.2.3 makes the same assumption.) Signed-off-by: Colin Watson <[email protected]>
Diffstat (limited to 'src/keysign.c')
0 files changed, 0 insertions, 0 deletions