You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readdir_r() is used in various places throughout flux-core, but may be unnecessary and is likely to be deprecated in a future POSIX version.
The allocation of the (buffer) dirent is done on the stack in Flux, but this is not the recommended method according to readdir_r(3) (see NOTES section).
Further, the use of readdir_r() may not be necessary, since readdir() is thread safe across directory streams. Within the stream, a recursive walk can be accomplished with readdir() as long as the returned entry is not used after recursion (or is copied beforehand).
readdir_r()
is used in various places throughout flux-core, but may be unnecessary and is likely to be deprecated in a future POSIX version.The allocation of the (buffer) dirent is done on the stack in Flux, but this is not the recommended method according to readdir_r(3) (see NOTES section).
Further, the use of
readdir_r()
may not be necessary, sincereaddir()
is thread safe across directory streams. Within the stream, a recursive walk can be accomplished withreaddir()
as long as the returned entry is not used after recursion (or is copied beforehand).See also: https://lwn.net/Articles/696474/
The text was updated successfully, but these errors were encountered: