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: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: David Ford <david(at)blue-labs(dot)org>, Brent Verner <brent(at)rcfile(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date: 2001-10-26 21:36:08
Message-ID: 28670.1004132168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Libpq certainly does deal with system calls being interrupted:  It does
> not allow them to be interrupted.  Take a look into the file pqsignal.c to
> see why.

???  Are you momentarily confusing backend and frontend libpq?

AFAICT the client-side libpq doesn't (and shouldn't) touch signal
handling at all, except for a couple of places in the print routines
that temporarily block SIGPIPE.

Since we deal happily with EINTR for most of the frontend socket calls,
I don't see a reason not to cope with it for connect() too.  I am
somewhat concerned about what exactly it means for a non-blocking
connect, however.  Maybe it doesn't mean anything, and we could treat
it the same as EINPROGRESS.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Sergio PiliDate: 2001-10-26 23:01:53
Subject: [Fwd: PostgreSQL new commands proposal]
Previous:From: Tom LaneDate: 2001-10-26 21:29:09
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully

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