Re: [PATCH] Add SIGCHLD catch to psql
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>, David Fetter <david@fetter.org>, Bruce Momjian <bruce@momjian.us>, pgsql-hackers@postgresql.org
Date: 2010-05-28T20:04:18Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> I thought it might be about that simple once you went at it the right >> way ;-). However, I'd suggest checking ferror(pset.queryFout) as well >> as the fflush result. > Sure, I can add the ferror() check. Patch attached. This seemed pretty small and uncontroversial, so I went ahead and committed it for 9.0. I rearranged the order of operations a bit to make it seem more coherent, and also added an initial clearerr() just to forestall problems if stdout had the error flag set for some reason. regards, tom lane