crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.36k stars 1.62k forks source link

Harmonize close on exec for `Socket` & `FileDescriptor` on Windows #14634

Closed ysbaddaden closed 4 months ago

ysbaddaden commented 4 months ago

Fixes the system_close_on_exec property like methods on Crystal:::System::Socket for the windows platform. They tried to access LibC::F_GETFD and LibC::F_SETFD that don't exist.

The behavior is unsupported on Windows, and it's now harmonized with how Crystal::System::FileDescriptor handles it (i.e. returning false and raising when trying to enable it).