Re: [patch] helps fe-connect.c handle -EINTR more gracefully

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Дата
Msg-id 20011025231319.A35174@rcfile.org
обсуждение исходный текст
Ответ на [patch] helps fe-connect.c handle -EINTR more gracefully  (David Ford <david@blue-labs.org>)
Ответы Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 25 Oct 2001 at 17:08 (-0400), David Ford wrote:
| I'm fresh in the code, but this has solved my issues with PQconnect*
| failing when interrupted by signals.  Some of it is sloppy and not to my
| liking yet, but I'm still digging through to see if anything else needs
| touched.  Comments appreciated.

Disclaimer: I may be wrong as hell ;-), but...


I'm not sure this is correct.  I've tried to /make/ a SIGALRM cause
connect to errno==EINTR, but I can't cause this condition.  I suspect
you have another signal being raised that is causing your symptom.
FTR, the textbook definition[1] of EINTR error for connect is:

  The attempt to establish a connection was interrupted by delivery
  of a signal that was caught; the connection will be established
  asynchronously.

Please check the attached prog to see if it is representative of your
code relating to the connect error you're seeing.  If it is, please
run it and see if you can get it to cause the EINTR error from connect.
If you can't I'm more certain that you have a problem elsewhere.

cheers.
  brent

1. http://www.opengroup.org/onlinepubs/7908799/xns/connect.html

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: [GENERAL] Using an SMP machine to make multiple indices on
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [patch] helps fe-connect.c handle -EINTR more gracefully