[Pkg-gnupg-commit] [libassuan] 30/437: assuan/ 2001-12-14 Marcus Brinkmann <marcus at g10code.de>

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 176f3715d4c0ece71d4cd091559164dc83bf7ea4
Author: Marcus Brinkmann <mb at g10code.com>
Date:   Wed Dec 19 00:18:11 2001 +0000

    assuan/
    2001-12-14  Marcus Brinkmann  <marcus at g10code.de>
    
    	* assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
    	it to save the length of the attic line.
    	Rediddle the code a bit to make it more clear what happens.
    
    agent/
    2001-12-19  Marcus Brinkmann  <marcus at g10code.de>
    
    	* query.c (start_pinentry): Add new argument to assuan_pipe_connect.
    
    sm/
    2001-12-19  Marcus Brinkmann  <marcus at g10code.de>
    
    	* call-agent.c (start_agent): Add new argument to assuan_pipe_connect.
---
 src/ChangeLog        |  6 ++++++
 src/assuan-connect.c | 17 ++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index f85e220..911fa98 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-14  Marcus Brinkmann  <marcus at g10code.de>
+
+	* assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
+	it to save the length of the attic line.
+	Rediddle the code a bit to make it more clear what happens.
+
 2001-12-14  Werner Koch  <wk at gnupg.org>
 
 	* assuan-listen.c (assuan_close_input_fd): New.
diff --git a/src/assuan-connect.c b/src/assuan-connect.c
index 683c7f0..613b54a 100644
--- a/src/assuan-connect.c
+++ b/src/assuan-connect.c
@@ -71,9 +71,11 @@ writen ( int fd, const char *buffer, size_t length )
 
 /* Connect to a server over a pipe, creating the assuan context and
    returning it in CTX.  The server filename is NAME, the argument
-   vector in ARGV.  */
+   vector in ARGV.  FD_CHILD_LIST is a -1 terminated list of file
+   descriptors not to close in the child.  */
 AssuanError
-assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[])
+assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[],
+		     int *fd_child_list)
 {
   static int fixed_signals = 0;
   AssuanError err;
@@ -149,7 +151,16 @@ assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[])
         n = MAX_OPEN_FDS;
       for (i=0; i < n; i++)
         {
-          if (i != fileno (stderr) 
+	  int *fdp = fd_child_list;
+
+	  if (fdp)
+	    {
+	      while (*fdp != -1 && *fdp != i)
+		fdp++;
+	    }
+
+          if (!(fdp && *fdp != -1)
+	      && i != fileno (stderr) 
 #ifdef HAVE_JNLIB_LOGGING
               && i != log_fd
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list