OpenSmalltalk / opensmalltalk-vm

Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.
http://opensmalltalk.org/
Other
557 stars 111 forks source link

Fix socket file check in sqResolverGetAddressInfoHostSizeServiceSizeF… #690

Closed nafiz1001 closed 2 months ago

nafiz1001 commented 2 months ago

…lagsFamilyTypeProtocol

Replacing && with || ensures it actually checks that either:

nafiz1001 commented 2 months ago

Oops. I realized that stat returns 0 for success. I will just need to flip the first condition then (state(...) == -1)

eliotmiranda commented 2 months ago

Hi Nafiz, please include a good comment on the expression. It's confusing. Please state what should happen when the stat call fails (because there is no file).

On Tue, Jul 9, 2024 at 3:52 PM Nafiz Islam @.***> wrote:

Closed #690 https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/690.

— Reply to this email directly, view it on GitHub https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/690#event-13447572476, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY5VUAWO3BON3TBNIVKGZLZLRSSTAVCNFSM6AAAAABKTWDVB6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGQ2DONJXGI2DONQ . You are receiving this because you are subscribed to this thread.Message ID: <OpenSmalltalk/opensmalltalk-vm/pull/690/issue_event/13447572476@ github.com>

-- ,,,^..^,,, best, Eliot