mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] configure: fix ctrl+C
@ 2016-10-25  1:53 Laine Gholson
  2016-10-27 11:12 ` Alexander Monakov
  0 siblings, 1 reply; 2+ messages in thread
From: Laine Gholson @ 2016-10-25  1:53 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

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.

[-- Attachment #2: configure.patch --]
[-- Type: text/x-patch, Size: 661 bytes --]

From 69f5bbcc3369ee94a91458178f0660a16c73732b Mon Sep 17 00:00:00 2001
From: Laine Gholson <laine.gholson@gmail.com>
Date: Mon, 24 Oct 2016 20:48:18 -0500
Subject: [PATCH] configure: fix ctrl-c

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 707eb12..13afa22 100755
--- 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
 
 #
 # Check whether we are cross-compiling, and set a default
-- 
2.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] configure: fix ctrl+C
  2016-10-25  1:53 [PATCH] configure: fix ctrl+C Laine Gholson
@ 2016-10-27 11:12 ` Alexander Monakov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Monakov @ 2016-10-27 11:12 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-27 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25  1:53 [PATCH] configure: fix ctrl+C Laine Gholson
2016-10-27 11:12 ` Alexander Monakov

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).