From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/142 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts review Date: Wed, 13 Jul 2011 18:46:11 +0400 Message-ID: <20110713144611.GA23842@openwall.com> References: <20110713110723.GA22153@openwall.com> <20110713133838.GA16618@brightrain.aerifal.cx> <20110713141249.GA23314@openwall.com> <20110713142603.GF16618@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310568380 21511 80.91.229.12 (13 Jul 2011 14:46:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 14:46:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-226-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 13 16:46:14 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qh0ha-00051n-5W for gllmg-musl@lo.gmane.org; Wed, 13 Jul 2011 16:46:14 +0200 Original-Received: (qmail 1340 invoked by uid 550); 13 Jul 2011 14:46:13 -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 1332 invoked from network); 13 Jul 2011 14:46:13 -0000 Content-Disposition: inline In-Reply-To: <20110713142603.GF16618@brightrain.aerifal.cx> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:142 Archived-At: On Wed, Jul 13, 2011 at 10:26:03AM -0400, Rich Felker wrote: > cat <test.c > #define _XOPEN_SOURCE 700 > #include > PATH_MAX > EOF > gcc -E test.c | tail -n 1 Yeah, it works for me too. It's just that in cluts.c, after all those other #include's and with no feature test macros defined at all, wouldn't provide PATH_MAX. Somehow on its own, also with no feature test macros at all, does provide PATH_MAX. Anyhow, I am not going to investigate further. It is clear that when we do request at least _BSD_SOURCE or _XOPEN_SOURCE, then does give us PATH_MAX. > > > > - act.sa_flags = SA_NODEFER; > > > > + act.sa_flags = 0; > > > > > > This was being used as part of the longjmp trick. > > > > Why, how? Did we seriously want to keep the signal blocked? > > It's to leave the signal unblocked so that longjmp can return without > having to restore the signal mask. Oh, you're right, and my comment above re: "keep the signal blocked" didn't make sense (it's the other way around). > It might be slightly more portable > to just manually unblock it or use sigsetjmp/siglongjmp to do so, but > unless I'm mistaken the last system with broken SA_NODEFER was Linux > 1.3 or so... I think that we need to switch to using sigsetjmp/siglongjmp as I had suggested before. Alexander