Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Verner <brent(at)rcfile(dot)org>
Cc: David Ford <david(at)blue-labs(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date: 2001-10-26 04:05:54
Message-ID: 21377.1004069154@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Brent Verner <brent(at)rcfile(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: David FordDate: 2001-10-26 04:26:22
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Previous:From: Brent VernerDate: 2001-10-26 03:13:19
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group