From: Marcus Brinkmann Date: Thu, 13 Dec 2001 21:38:11 +0000 (+0000) Subject: 2001-12-13 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1210 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e1643c49f521913c42ba6f6191c3ec4a57812f70;p=gpgme.git 2001-12-13 Marcus Brinkmann * assuan-connect.c (assuan_pipe_connect): Remove code that closes all the little file descriptors we set up. --- diff --git a/trunk/assuan/ChangeLog b/trunk/assuan/ChangeLog index 8d05c0e..d74fa03 100644 --- a/trunk/assuan/ChangeLog +++ b/trunk/assuan/ChangeLog @@ -1,3 +1,8 @@ +2001-12-13 Marcus Brinkmann + + * assuan-connect.c (assuan_pipe_connect): Remove code that closes + all the little file descriptors we set up. + 2001-12-13 Marcus Brinkmann * assuan-buffer.c (assuan_read_line): Fix order of execution to diff --git a/trunk/assuan/assuan-connect.c b/trunk/assuan/assuan-connect.c index 683c7f0..b8ce1a9 100644 --- a/trunk/assuan/assuan-connect.c +++ b/trunk/assuan/assuan-connect.c @@ -137,26 +137,10 @@ assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[]) if ((*ctx)->pid == 0) { - int i, n; char errbuf[512]; -#ifdef HAVE_JNLIB_LOGGING - int log_fd = log_get_fd (); -#endif - /* close all files which will not be duped but keep stderr - and log_stream for now */ - n = sysconf (_SC_OPEN_MAX); - if (n < 0) - n = MAX_OPEN_FDS; - for (i=0; i < n; i++) - { - if (i != fileno (stderr) -#ifdef HAVE_JNLIB_LOGGING - && i != log_fd -#endif - && i != rp[1] && i != wp[0]) - close(i); - } - errno = 0; + + close (rp[0]); + close (wp[1]); /* Dup handles and to stdin/stdout and exec */ if (rp[1] != STDOUT_FILENO)