[ruby-cvs:67955] normal:r60774 (trunk): dir.c: revert r60772, r60770, and r60769

normal at ruby-lang.org normal at ruby-lang.org
Wed Nov 15 16:24:26 JST 2017


normal	2017-11-15 16:24:26 +0900 (Wed, 15 Nov 2017)

  New Revision: 60774

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60774

  Log:
    dir.c: revert r60772, r60770, and r60769
    
    Using readdir(3) without any locking causes thread-safety
    problems if directory streams get shared between threads.  On
    ancient platforms, readdir(3) may have thread-safety problems
    even on different directory streams.
    
    Using readdir_r(3) is not viable, either, as it's deprecated
    due to name overflow problems.
    
    So for now, rely on GVL as in previous Rubies and perhaps
    consider per-"struct dir_data" mutexes for modern platforms
    which allow concurrent calls to readdir(3) on different
    directory streams.

  Modified files:
    trunk/dir.c


More information about the ruby-cvs mailing list