From c234f37b5995457e2a5b518648e6735612cb3c27 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Thu, 20 Aug 2015 18:28:31 -0500 Subject: [PATCH] makeWrapper: child process inherits argv[0] --- pkgs/build-support/setup-hooks/make-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index 41f2a59246d1..f474ff5e88ed 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -72,8 +72,8 @@ makeWrapper() { # Note: extraFlagsArray is an array containing additional flags # that may be set by --run actions. - echo exec "$original" $flagsBefore '"${extraFlagsArray[@]}"' '"$@"' >> $wrapper - + echo exec -a '"$0"' "$original" $flagsBefore '"${extraFlagsArray[@]}"' '"$@"' >> $wrapper + chmod +x $wrapper }