[Xapian-discuss] Omindex.cc BSD bug

Lionel lionel at digitorial.co.uk
Mon Oct 2 17:31:51 BST 2006


Hi guys:
         I was trying to index a large set of PDF documents using omindex
and the system started to run out of forks (sh: fork temporarily
unavailable)  making the system unusable and probably skipping documents.

I'm using MAC Osx Server 10.4.3 (Darwin/BSD) and GCC 4.0.

The problem: On function stdout_to_string a popen is called, but is not
closed properly (according the popen manual) because is using fclose instead
of pclose and hence processes created by popen are not killed.

Solution: Omindex.cc line 201, replace fclose by pclose :

If (pclose(sh) == -1) throw read ReadError();

This must correct the problem, I'm not sure if will cause the same error in
other platforms or UNIX.


Cheers








More information about the Xapian-discuss mailing list