From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6693 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC] EINTR and PC loser-ing library design Date: Mon, 8 Dec 2014 10:00:31 -0500 Message-ID: <20141208150031.GD4574@brightrain.aerifal.cx> References: <20141208141039.GA4574@brightrain.aerifal.cx> <5485B5E1.90602@skarnet.org> <20141208143223.GB4574@brightrain.aerifal.cx> <5485B98D.4010603@skarnet.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1418050852 20436 80.91.229.3 (8 Dec 2014 15:00:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2014 15:00:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6706-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 08 16:00:46 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 1Xxznp-0003Pl-Lp for gllmg-musl@m.gmane.org; Mon, 08 Dec 2014 16:00:45 +0100 Original-Received: (qmail 9393 invoked by uid 550); 8 Dec 2014 15:00:44 -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 9375 invoked from network); 8 Dec 2014 15:00:43 -0000 Content-Disposition: inline In-Reply-To: <5485B98D.4010603@skarnet.org> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6693 Archived-At: On Mon, Dec 08, 2014 at 03:45:33PM +0100, Laurent Bercot wrote: > On 08/12/2014 15:32, Rich Felker wrote: > > >The system call restarts (or, formally, it's as if it were never > >interrupted; EINTR only applies to signal _handlers_). > > Could you please provide a pointer to the specification that > guarantees this ? I've never been able to find a normative text that > ensures you will never get EINTR unless you explicitly install a > signal handler without SA_RESTART. I've had a hard time pinning it down too, but that's what all modern (e.g. modern enough to have a working sigaction) implementations do, and it's the obviously correct behavior. I would consider making a request for clarification here, but after what happened with the C locale issue, I'd kinda fear some trolls would appear and insist that EINTR be allowed to happen for no good reason. :( > >> And that happens all the time in asynchronous event loops where you > >>handle signals with a self-pipe. ;) > > > >Only if you have installed interrupting signal handlers. > > Which basically means any signal except SIGCHLD. No. Interrupting means "installed without SA_RESTART". It has nothing to do with which signal it is, but rather how you installed the handler. Rich