Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0 - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Date
Msg-id CAA4eK1JjhYAzP6j8Fm49+F4PyYzaQ82w2CTLvbkeQ6WspOLfbA@mail.gmail.com
Whole thread Raw
In response to [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0  (Joel Jacobson <joel@trustly.com>)
List pgsql-hackers
On Wed, Dec 25, 2013 at 6:05 PM, Joel Jacobson <joel@trustly.com> wrote:
> Hi,
>
> I've tried to fix some bugs reported by Andrey Karpov in an article at
> http://www.viva64.com/en/b/0227/
>
> The value returned by socket() is unsigned on Windows and can thus not
> be checked if less than zero to detect an error, instead
> PGINVALID_SOCKET should be used, which is hard-coded to -1 on
> non-windows platforms.

Though I have not verified all instances you have fixed in your patch, but I
feel the general direction to fix is right.
I think you can upload your patch for next CommitFest.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Next
From: Christian Kruse
Date:
Subject: Re: Patch: show relation and tuple infos of a lock to acquire