<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/posix-io.c, branch gpgme-1.10.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.10.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.10.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2017-10-12T07:00:09Z</updated>
<entry>
<title>core: use getdents64 syscall on linux instead of getdents.</title>
<updated>2017-10-12T07:00:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-10-11T15:38:39Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=00daac15530eabed5e61d841b2df939c2242667c'/>
<id>urn:sha1:00daac15530eabed5e61d841b2df939c2242667c</id>
<content type='text'>
* src/posix-io.c (get_max_fds): use getdents64 instead of getdents.
--

getdents64 was introduced in linux 2.4, so it should be widely
available.  some Linux architectures which post-date 2.4 (e.g. arm64)
appear to not have getdents at all, so it's probably better to use the
more modern interface.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>core: Allow disabling the use of SYS_getdents for Linux.</title>
<updated>2017-10-04T16:03:54Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-10-04T16:03:54Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4632adf403611b50be2b4e852a4607070935d0e5'/>
<id>urn:sha1:4632adf403611b50be2b4e852a4607070935d0e5</id>
<content type='text'>
* configure.ac (USE_LINUX_GETDENTS): New ac_define.  Add option
--disable-linux-getdents.
* src/posix-io.c: Make use of USE_LINUX_GETDENTS.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Restore get_max_fds optimization on Linux</title>
<updated>2017-10-04T15:26:39Z</updated>
<author>
<name>Colin Watson</name>
<email>cjwatson@debian.org</email>
</author>
<published>2017-09-16T03:16:45Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b5b996b1a142abb90296f5feadf0b5b19c59f738'/>
<id>urn:sha1:b5b996b1a142abb90296f5feadf0b5b19c59f738</id>
<content type='text'>
* 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 &gt;= 3.2.3 makes the same
assumption.)

Signed-off-by: Colin Watson &lt;cjwatson@debian.org&gt;
</content>
</entry>
<entry>
<title>FreeBSD's closefrom(2) does not return errors</title>
<updated>2017-04-03T10:25:57Z</updated>
<author>
<name>Pietro Cerutti</name>
<email>gahr@gahr.ch</email>
</author>
<published>2017-04-03T08:31:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=50565982cdd502c3852fcc6f598932bd32b5cdc3'/>
<id>urn:sha1:50565982cdd502c3852fcc6f598932bd32b5cdc3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>core: Optimize fork/exec for *BSD and Solaris.</title>
<updated>2017-02-03T12:56:23Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-02-03T12:56:23Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=51bd69f216a9e2930eeba4b5f6c20e952a381720'/>
<id>urn:sha1:51bd69f216a9e2930eeba4b5f6c20e952a381720</id>
<content type='text'>
* configure.ac (closefrom): Add to ac_check_funcs.
* src/posix-io.c (_gpgme_io_spawn): Use closefrom.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Fix possible deadlock due to get_max_fds.</title>
<updated>2017-02-03T12:13:22Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-02-03T12:13:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=93a59070c699d569d1eac7ba22355fe3f5d10882'/>
<id>urn:sha1:93a59070c699d569d1eac7ba22355fe3f5d10882</id>
<content type='text'>
* src/posix-io.c (get_max_fds): Do not use the Linux optimization.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>doc: Replace http: by https: in core source files.</title>
<updated>2016-11-16T12:27:00Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-11-16T12:27:00Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7f5f26fd66e60e60de875c70b1f93f60c0438780'/>
<id>urn:sha1:7f5f26fd66e60e60de875c70b1f93f60c0438780</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Use better error code when using select with a too high fd.</title>
<updated>2016-11-10T18:49:58Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-11-10T18:49:13Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=6e57379c8e37c0863f7d12819a5a7d0781bd76d2'/>
<id>urn:sha1:6e57379c8e37c0863f7d12819a5a7d0781bd76d2</id>
<content type='text'>
* src/posix-io.c (_gpgme_io_select): Return EMFILE instead of EBADF.
--

Also EBADF seem more correct, EMFILE (Too man open files) gives
a clearer message to the user that there are somehow too many files
open.  The problem can be exhibited by running lots of threads,

We should eventually move to poll but that would be a large change and
so we better fix it with the planned migration of the I/O subsystem to
libgpgrt (currently known as libgpg-error).

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Use const char * where appropriate.</title>
<updated>2016-09-13T18:59:07Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-09-13T18:59:07Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=51f9acbca935c5287d9a28205037b0923e9a65f5'/>
<id>urn:sha1:51f9acbca935c5287d9a28205037b0923e9a65f5</id>
<content type='text'>
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Make sure FD_SET is not used with an out of range fd.</title>
<updated>2016-06-14T06:38:34Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-06-14T06:35:12Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8173c4f1f8a145c4b1d454f6f05e26950e23d675'/>
<id>urn:sha1:8173c4f1f8a145c4b1d454f6f05e26950e23d675</id>
<content type='text'>
* src/posix-io.c (_gpgme_io_select): Check for FD out of range.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
