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

From: David Ford <david(at)blue-labs(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date: 2001-10-26 04:58:14
Message-ID: 3BD8ED66.4000304@blue-labs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
>
>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.
>

I didn't specify my OS because this sort of a thing is standard *nix etc
design (well, m$ excluded of course).

I use Linux. Every *nix that I know of can have system calls be
interrupted.

Please wait a day before applying the patch, I want to make it a bit
more clean/readable and make sure I covered everything in fe-connect.c,
I found that the SSL functions are traversed even if ssl is turned off
in the config file and I have to handle that too.

David

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brent Verner 2001-10-26 05:01:42 Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Previous Message David Ford 2001-10-26 04:26:22 Re: [patch] helps fe-connect.c handle -EINTR more gracefully