aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2001-12-13 21:38:11 +0000
committerMarcus Brinkmann <[email protected]>2001-12-13 21:38:11 +0000
commit0dba5161e234d8d2e45571b2eaaa45b31b0abd8c (patch)
tree7ca1e1051edd5d4f001980842f7bb47bdf93fc38
parent2001-12-13 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-0dba5161e234d8d2e45571b2eaaa45b31b0abd8c.tar.gz
gpgme-0dba5161e234d8d2e45571b2eaaa45b31b0abd8c.zip
2001-12-13 Marcus Brinkmann <[email protected]>
* assuan-connect.c (assuan_pipe_connect): Remove code that closes all the little file descriptors we set up.
Diffstat (limited to '')
-rw-r--r--assuan/ChangeLog5
-rw-r--r--assuan/assuan-connect.c22
2 files changed, 8 insertions, 19 deletions
diff --git a/assuan/ChangeLog b/assuan/ChangeLog
index 8d05c0e9..d74fa030 100644
--- a/assuan/ChangeLog
+++ b/assuan/ChangeLog
@@ -1,5 +1,10 @@
2001-12-13 Marcus Brinkmann <[email protected]>
+ * assuan-connect.c (assuan_pipe_connect): Remove code that closes
+ all the little file descriptors we set up.
+
+2001-12-13 Marcus Brinkmann <[email protected]>
+
* assuan-buffer.c (assuan_read_line): Fix order of execution to
get correct return values.
diff --git a/assuan/assuan-connect.c b/assuan/assuan-connect.c
index 683c7f06..b8ce1a9c 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)