Re: BUG #1467: fe_connect doesn't handle EINTR right - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: BUG #1467: fe_connect doesn't handle EINTR right
Date
Msg-id 3616.24.211.165.134.1119829083.squirrel@www.dunslane.net
Whole thread Raw
In response to BUG #1467: fe_connect doesn't handle EINTR right  (AgentM <agentm@themactionfaction.com>)
List pgsql-patches
AgentM said:
> Attached is a patch which corrects the behavior. I verified that the
> patch does not interfere with normal operation (using psql) but
> unfortunately the code path is virtually impossible to test without a
> really slow connection to a postgresql server [which I thankfully
> don't have]. To test the patch, you would need to send an interrupt
> at the exact time that the kernel is connect()ing in blocking mode-
> good luck.
>
> Also, I recommend removing a (sarcastic?) comment left by a previous
> developer- I wrote a note about in my patch.
>
> The patch is against 8.0.3 [because HEAD requires access to a
> specific version of bison] but I imagine that the code hasn't changed
> in fe-connect.c since then.
>
> Patch against src/interfaces/libpq/fe-connect.c (v 8.0.3)

It's not even legal C89 C - please don't use // style comments.

cheers

andrew



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1467: fe_connect doesn't handle EINTR right
Next
From: Simon Riggs
Date:
Subject: Constraint Exclusion (Partitioning) - Initial Review requested