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
On Mon, Oct 02, 2006 at 05:31:51PM +0100, Lionel wrote:> 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.Yes, that should indeed be pclose not fclose (it's actually already fixed in SVN, but thanks for reporting it). Cheers, Olly