On Fri, 25 Mar 2005 20:37:36 -0500 Julia Wolf <[EMAIL PROTECTED]>
(Bbabbled:
(B
(B> Problem:
(B> Each time that imlib_load_image() is called, in turn, each loader
(B> library is called. The loader library for bz2 files opens a temporary
(B> file "/tmp/imlib2_loader_bz2-XXXXXX" and then almost immediately deletes
(B> it. But is never closes the tempfile so lsof will show:
(B>
(B> test-bin 28356 jwolf 3u REG 3,2 0 213317
(B> /tmp/imlib2_loader_bz2-55VbCn
(B(deleted)
(B>
(B> If you are calling imlib_load_image() many times in a loop -- say to
(B> convert a bunch of images -- you will end up with a new open filehandle
(B> to a deleted file each iteration. After 1024 iterations you run out of
(B> filehandles. (at the default ulimit)
(B
(Booh that is nasty! BAD bz2 loader. BAD!. thanks for pointing this out. i
(Bre-arranged things to only 1. use this loader IF it ends in .bz2 AND to try load
(Bthe real file first before making the tmp file so if that fails you dont go and
(Bmake a tmp file anyway. :)
(B
(B> Solution (maybe):
(B>
(B> --- src/modules/loaders/loader_bz2.c.orig 2005-03-24 15:54:50.541223640
(B-0800
(B> +++ src/modules/loaders/loader_bz2.c 2005-03-24 15:54:50.541223640 -0800
(B> @@ -61,6 +61,7 @@
(B> return 0;
(B>
(B> if (!(fp = fopen (im->real_file, "rb"))) {
(B> + close (dest);
(B> unlink (tmp);
(B> return 0;
(B> }
(B>
(B> I've tested this once and it seemed to fix the problem, but I'm not 100%
(B> certain that the new bz2.so was being called by imlib2.
(B>
(B> Licence:
(B> I hereby release the above patch into the Public Domain. You can even
(B> say you wrote it if you want.
(B>
(B>
(B>
(B> -------------------------------------------------------
(B> SF email is sponsored by - The IT Product Guide
(B> Read honest & candid reviews on hundreds of IT Products from real users.
(B> Discover which products truly live up to the hype. Start reading now.
(B> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B> _______________________________________________
(B> enlightenment-devel mailing list
(B> [email protected]
(B> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
(B>
(B
(B
(B--
(B------------- Codito, ergo sum - "I code, therefore I am" --------------
(BThe Rasterman (Carsten Haitzler) [EMAIL PROTECTED]
$BMg9%B?(B [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B
(B
(B-------------------------------------------------------
(BSF email is sponsored by - The IT Product Guide
(BRead honest & candid reviews on hundreds of IT Products from real users.
(BDiscover which products truly live up to the hype. Start reading now.
(Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B_______________________________________________
(Benlightenment-devel mailing list
([email protected]
(Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel