libpq and psql not on same page about SIGPIPE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: libpq and psql not on same page about SIGPIPE
Date: 2004-11-15 16:54:56
Message-ID: 8831.1100537696@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

libpq compiled with --enable-thread-safety thinks it can set the SIGPIPE
signal handler. It thinks once is enough.

psql thinks it can arbitrarily flip the signal handler between SIG_IGN
and SIG_DFL. Ergo, after the first use of the pager for output, libpq's
SIGPIPE handling will be broken.

I submit that psql is unlikely to be the only program that does this,
and therefore that libpq must be considered broken, not psql.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bort, Paul 2004-11-15 17:07:09 Re: psql \e broken again
Previous Message Robert Treat 2004-11-15 16:46:25 Re: Update TIP 9 please

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2004-11-15 19:34:35 Re: Win32 signals & sockets
Previous Message Simon Riggs 2004-11-15 16:07:08 Re: diff -c please