[2020-02][System.Native] Handle ReadDir EINTR (#21029)mono-6.12.0.140
commit51d876a041efde9569b94d29743466ec6841109e
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Thu, 29 Apr 2021 13:22:41 +0000 (29 09:22 -0400)
committerGitHub <noreply@github.com>
Thu, 29 Apr 2021 13:22:41 +0000 (29 09:22 -0400)
tree15789a0991887572f0cee33d52002de4905f22e9
parent581e5827f469ca214f42ca94b4e1f79859281e20
[2020-02][System.Native] Handle ReadDir EINTR (#21029)

* [System.Native] Handle ReadDir EINTR

Handle EINTR for opendir/readdir/closedir.

Because of how thread aborts work, we must loop in managed.
A thread abort will break syscalls and return EINTR, but mono will not raise a
ThreadAbortException until a pinvoke returns.

(Despite the documentation, opendir/readdir/closedir sometimes return EINTR on
macOS Big Sur.)

Related to https://github.com/mono/mono/issues/20799

* bump corefx

* [System] on unix, include Interop.ReadDir.Mono.cs

on mac it's in corlib, on unix and android it's in System, for some reason

* Add newline

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
external/corefx
mcs/class/System/corefx.unix.sources
mcs/class/System/monodroid_System.dll.sources
mcs/class/System/unix_net_4_x_System.dll.sources
mcs/class/corlib/corefx/Interop.ReadDir.Mono.cs [new file with mode: 0644]
mcs/class/corlib/unix_build_corlib.dll.sources