[git] GPGME - branch, master, updated. gpgme-1.7.1-31-g6e57379

by Werner Koch cvs at cvs.gnupg.org
Thu Nov 10 19:52:41 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  6e57379c8e37c0863f7d12819a5a7d0781bd76d2 (commit)
      from  ddd0a3cf90ac4b0a27ea610ebd7b9b8016ff43c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6e57379c8e37c0863f7d12819a5a7d0781bd76d2
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 10 19:49:13 2016 +0100

    core: Use better error code when using select with a too high fd.
    
    * 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 <wk at gnupg.org>

diff --git a/src/posix-io.c b/src/posix-io.c
index c0b2f4f..c903072 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -607,7 +607,7 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
           if (fds[i].fd >= FD_SETSIZE)
             {
               TRACE_END (dbg_help, " -BAD- ]");
-              gpg_err_set_errno (EBADF);
+              gpg_err_set_errno (EMFILE);
               return TRACE_SYSRES (-1);
             }
 	  assert (!FD_ISSET (fds[i].fd, &readfds));
@@ -622,7 +622,7 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
           if (fds[i].fd >= FD_SETSIZE)
             {
               TRACE_END (dbg_help, " -BAD- ]");
-              gpg_err_set_errno (EBADF);
+              gpg_err_set_errno (EMFILE);
               return TRACE_SYSRES (-1);
             }
 	  assert (!FD_ISSET (fds[i].fd, &writefds));

-----------------------------------------------------------------------

Summary of changes:
 src/posix-io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list