From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10672 Path: news.gmane.org!.POSTED!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] configure: fix ctrl+C Date: Thu, 27 Oct 2016 14:12:08 +0300 (MSK) Message-ID: References: <23b44ff4-70c7-9db0-a727-7b5336b3827b@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1477566748 7922 195.159.176.226 (27 Oct 2016 11:12:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2016 11:12:28 +0000 (UTC) User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) To: musl@lists.openwall.com Original-X-From: musl-return-10685-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 27 13:12:24 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bzibf-0001G9-9v for gllmg-musl@m.gmane.org; Thu, 27 Oct 2016 13:12:23 +0200 Original-Received: (qmail 19914 invoked by uid 550); 27 Oct 2016 11:12:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 19893 invoked from network); 27 Oct 2016 11:12:22 -0000 In-Reply-To: <23b44ff4-70c7-9db0-a727-7b5336b3827b@gmail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:10672 Archived-At: On Mon, 24 Oct 2016, Laine Gholson wrote: > the trap in the configure script doesn't exit like it should, fix that, and > while I am at it, use rm -f to fix spurious errors from rm. Did you observe such an error in practice? If so, I'm curious what it was, I don't see how it can arise because "$tmpc" is created before the trap is installed, and is not removed other than by the trap. > --- a/configure > +++ b/configure > @@ -214,7 +214,7 @@ tmpc="./conf$$-$PPID-$i.c" > test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc" > done > set +C > -trap 'rm "$tmpc"' EXIT INT QUIT TERM HUP > +trap 'rm -f "$tmpc"; exit 1' EXIT INT QUIT TERM HUP This will cause configure to exit with status 1 even on normal termination, though. Alexander