Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Wanner <markus(at)bluegap(dot)ch>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Date: 2010-09-06 18:46:30
Message-ID: 20707.1283798790@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Markus Wanner <markus(at)bluegap(dot)ch> writes:
> Is pselect() really as unportable as stated in the patch? What platforms
> have problems with pselect()?

Well, it's not defined in the Single Unix Spec, which is our customary
reference for portability. Also, it's alleged that some platforms have
it but in a form that's not actually any safer than select(). For
example, I read in the Darwin man page for it

IMPLEMENTATION NOTES
The pselect() function is implemented in the C library as a wrapper
around select().

and that man page appears to be borrowed verbatim from FreeBSD.

> Using the self-pipe trick, don't we risk running into the open file
> handles limitation? Or is it just two handles per process?

It's just two handles per process.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2010-09-06 19:07:33 Re: 9.1alpha1 bundled -- please verify
Previous Message Peter Eisentraut 2010-09-06 18:41:27 Re: 9.1alpha1 bundled -- please verify