Skip to main content.
home | support | download

Back to List Archive

bug in swish with .noindex files

From: Ron Klatchko <ron(at)not-real.library.ucsf.edu>
Date: Wed Mar 31 1999 - 01:48:39 GMT
I just found a bug in Swish that happens when there are too many .noindex
files (or other files named in "FileRules directory contains" direcective).
 Each time Swish run across one of these, a file descriptor is leaked.
Once enough file descriptors are leaked, Swish is unable to open any more
files to index nor is it able to open the index file to write it.

This bug has been there for quite some time.  It existed in every version I
checked back to 1.1.

Anyway, the fix is quite simple.  The following patch was built around
version 1.3.2 but should be simple enough to install in any version.

*** fs.c        Tue Mar 30 17:45:52 1999
--- fs.c.1      Wed Jan  6 10:27:02 1999
***************
*** 133,142 ****
                        }
                        tmplist = tmplist->next;
                }
!               if (badfile) {
!                       closedir(dfd);
                        return;
-               }
        }
        closedir(dfd);
        dfd = opendir(dir);
--- 133,140 ----
                        }
                        tmplist = tmplist->next;
                }
!               if (badfile)
                        return;
        }
        closedir(dfd);
        dfd = opendir(dir);

moo
----------------------------------------------------------------------
          Ron Klatchko - Manager, Advanced Technology Group           
           UCSF Library and Center for Knowledge Management           
                        ron@library.ucsf.edu                
Received on Tue Mar 30 17:46:34 1999