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

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Дата
Msg-id 20011026010142.A35990@rcfile.org
обсуждение исходный текст
Ответ на Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 26 Oct 2001 at 00:05 (-0400), Tom Lane wrote:
| 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.

sorry, I tested the attached prog on linux(2.2/2.4) and freebsd(4.4R)
to both local and remote(slow) servers.

| 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.
 I've found numerous examples where connect() is retried after EINTR,
infact it appears to be fairly common.

cheers, brent

-- 
"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 по дате отправления:

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