[KPhotoAlbum] Patch to speed up scanning for new images

Shawn Willden shawn-kimdaba at willden.org
Fri May 11 14:49:07 CEST 2007


On Friday 11 May 2007 02:35:40 am Tero Tilus wrote:
> On Thu, 10 May 2007, Robert L Krawitz wrote:
> > I understand the problem, but it doesn't sound like there's really a
> > safe way around it, since KPhotoAlbum is threaded.
>
> How come?  From http://seclists.org/fulldisclosure/2005/Nov/0001.html
>
>   "Programs using readdir_r may be able to use readdir. [...] for
>    portability the use of readdir in a multithreaded program should be
>    controlled using a mutex."
>
> Am I missing something here?  (I'm really not an expert in this...)

Doing that requires finding and mutex-protecting all uses of readdir with the 
same mutex.  If you're using library code, and KPA uses a lot of it, you may 
not know if or where it uses readdir.

	Shawn


More information about the KPhotoAlbum mailing list