[Xapian-tickets] [Xapian] #665: Avoid C library functions not guaranteed to be thread-safe
Xapian
nobody at xapian.org
Tue May 5 04:57:31 BST 2015
#665: Avoid C library functions not guaranteed to be thread-safe
-------------------------+--------------------------
Reporter: olly | Owner: olly
Type: defect | Status: new
Priority: normal | Milestone: 1.3.x
Component: Library API | Version: 1.3.2
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+--------------------------
Comment (by olly):
POSIX requires that `readdir()` be thread-safe if the `DIR*` pointer is
only used in a single thread, which is how we always use it:
> The returned pointer, and pointers within the structure, might be
invalidated or the structure or the storage areas might be overwritten by
a subsequent call to readdir() on the same directory stream. '''They shall
not be affected by a call to readdir() on a different directory stream.'''
(my emphasis)
http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
--
Ticket URL: <http://trac.xapian.org/ticket/665#comment:5>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list