Too many open files during import

Werner Koch wk at gnupg.org
Mon Jun 9 00:21:24 CEST 2003


On Sat, 7 Jun 2003 23:14:34 -0300, Juan F Codagnone said:

> gnupg --import  doesn't close the files after importing all the keys of a
> file.

Thanks for reporting.  Here is a patch:

Index: import.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/import.c,v
retrieving revision 1.68.2.13
diff -u -r1.68.2.13 import.c

--- import.c	31 May 2003 21:44:31 -0000	1.68.2.13
+++ import.c	8 Jun 2003 21:16:41 -0000
@@ -163,6 +163,8 @@
 	else {
 	    int rc = import( inp, fast, fname, stats, options );
 	    iobuf_close(inp);
+            /* must invalidate that ugly cache to actually close it */
+            iobuf_ioctl (NULL, 2, 0, (char*)fname);
 	    if( rc )
 		log_error("import from `%s' failed: %s\n", fname,
 							   g10_errstr(rc) );

-- 
Werner Koch                                      <wk at gnupg.org>
The GnuPG Experts                                http://g10code.com
Free Software Foundation Europe	                 http://fsfeurope.org





More information about the Gnupg-devel mailing list