[Bug 236815] [patch] devel/glib20: loops over all possible file descriptors
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Sep 12 11:29:46 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236815
--- Comment #19 from rozhuk.im at gmail.com ---
(In reply to Ting-Wei Lan from comment #12)
IMHO this is wrong or incomplete description.
1. malloc() can not cause deadlock, it is heavy used by many multithread apps.
2. Docs says that opendir() is thread and mt safe:
http://man7.org/linux/man-pages/man3/opendir.3.html
But readdir() is not: MT-Unsafe:
http://man7.org/linux/man-pages/man3/readdir.3.html
3. Reading dir using more than one syscall is bad idea because between read it
can change some content is it will not be handled/processed.
As I remember this was a reason to drop opendir() in mine FAM backend and some
strange crashes:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214338
So I do not understand why some one can need LOCK() in fdwalk().
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-gnome
mailing list