From: Marcus Brinkmann Date: Thu, 13 Dec 2001 21:38:11 +0000 (+0000) Subject: 2001-12-13 Marcus Brinkmann X-Git-Tag: gpgme-0-3-0~42 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0dba5161e234d8d2e45571b2eaaa45b31b0abd8c;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/assuan/ChangeLog b/assuan/ChangeLog index 8d05c0e..d74fa03 100644 --- a/assuan/ChangeLog +++ b/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/assuan/assuan-connect.c b/assuan/assuan-connect.c index 683c7f0..b8ce1a9 100644 --- a/assuan/assuan-connect.c +++ b/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)