Re: innocuous: pgbench does FD_ISSET on invalid socket - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: innocuous: pgbench does FD_ISSET on invalid socket
Date
Msg-id alpine.DEB.2.10.1602151152450.18755@sto
Whole thread Raw
In response to innocuous: pgbench does FD_ISSET on invalid socket  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: innocuous: pgbench does FD_ISSET on invalid socket
List pgsql-hackers
Hello Alvaro,

> Any objections to changing it like this?  I'd probably backpatch to 9.5,
> but no further (even though this pattern actually appears all the way
> back.)

My 0.02€: if the pattern is repeated, maybe a function which incorporates 
the check would save lines and improve overall readability?
   ... = safePQsocket(...);

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Dmitry Ivanov
Date:
Subject: [WIP] ALTER ... OWNER TO ... CASCADE
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [PROPOSAL] VACUUM Progress Checker.