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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Дата
Msg-id 21377.1004069154@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Brent Verner <brent@rcfile.org>)
Ответы Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Brent Verner <brent@rcfile.org>)
Список pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> 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.

It wouldn't surprise me in the least if this behavior is
platform-dependent.  It may well be that David's kernel will allow
connect() to be interrupted by SIGALRM while yours won't.  (Which
reminds me that neither of you specified what platforms you were
testing on.  For shame.)  Or maybe the difference depends on whether
you are trying to connect to a local or remote server.

Unless someone can point out a situation where retrying connect()
after EINTR is actively bad, my inclination is to accept the patch.
It seems like a net improvement in robustness to me, with no evident
downside other than a line or two more code.
        regards, tom lane


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

Предыдущее
От: Brent Verner
Дата:
Сообщение: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Следующее
От: David Ford
Дата:
Сообщение: Re: [patch] helps fe-connect.c handle -EINTR more gracefully