From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6697 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC] EINTR and PC loser-ing library design Date: Mon, 08 Dec 2014 16:49:00 +0100 Message-ID: <5485C86C.4090407@skarnet.org> References: <20141208141039.GA4574@brightrain.aerifal.cx> <5485B5E1.90602@skarnet.org> <20141208143223.GB4574@brightrain.aerifal.cx> <5485B98D.4010603@skarnet.org> <20141208152844.GF4574@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1418053760 5458 80.91.229.3 (8 Dec 2014 15:49:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2014 15:49:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6710-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 08 16:49:10 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Xy0Yg-0006Z4-DH for gllmg-musl@m.gmane.org; Mon, 08 Dec 2014 16:49:10 +0100 Original-Received: (qmail 26540 invoked by uid 550); 8 Dec 2014 15:49:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26527 invoked from network); 8 Dec 2014 15:49:08 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <20141208152844.GF4574@brightrain.aerifal.cx> X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeejiedrfeefgdeilecutefuodetggdotefrucfrrhhofhhilhgvmecupfgfoffgtffkveetuefngfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhfgggvffufhgjtgfgsehtjegrtddtfeejnecuhfhrohhmpefnrghurhgvnhhtuceuvghrtghothcuoehskhgrqdguihgvthhlihgstgesshhkrghrnhgvthdrohhrgheq Xref: news.gmane.org gmane.linux.lib.musl.general:6697 Archived-At: On 08/12/2014 16:28, Rich Felker wrote: > The only such exception I'm aware of is that POSIX allows, but does > not require, select to fail with EINTR even when SA_RESTART is used. What do you say of poll ? The poll() function shall fail if: [EINTR] A signal was caught during poll(). Note that it is "shall", not "may". One may argue that the SA_RESTART behaviour has priority over "poll() shall fail with EINTR if a signal is caught", as with other functions such as read(), but one may also argue that, just as with select(), it makes perfect sense to *not* restart poll() when a signal is caught, since time has elapsed since the original call and the application may want to update the timeout values, so the exception that applies to select should also apply to poll. -- Laurent