From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: psql bug |
Date: | 2012-05-18 21:50:31 |
Message-ID: | 4FB6C427.9000407@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Seems system() call cleanups sigaction state on FreeBSD.
The root of problem is a threading library. In FreeBSD there are two versions of
sigaction() (system() and others) depending on thread enabled. libpq library is
compiled by default with -pthread switch but psql is linked without that.
This mixed linkage is a reason why system() call for external program loses
signal handler.
Next, configure script correctly sets PTHREAD_* variables but PTHREAD_LIBS is
not used for psql linking.
What is the best way to fix that? I suggest to add PTHREAD_LIBS to linking psql
at least. Although, suppose, it could be a reason for other cryptic bugs.
I didn't test this solution on other OSes, but, suppose, it will work.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2012-05-18 22:19:52 | Re: Pre-alloc ListCell's optimization |
Previous Message | Alvaro Herrera | 2012-05-18 21:18:57 | Re: read() returns ERANGE in Mac OS X |