summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
committerDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
commit86e7f6075671e08c456f389d8ecba47190c03f0f (patch)
tree2698fd22bbb781a6227ed84b5ef8bbacab647e6e /scripts/makepkg.sh.in
parentcfa2eebdafc4d2341621e24ce61dd5a74a0de9fc (diff)
parentc37c9c5dcae06c1585b4da4c0b838f5b44e1498e (diff)
Merge branch 'maint'
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5742c492..93cf5662 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -794,15 +794,15 @@ run_function() {
# ensure overridden package variables survive tee with split packages
logpipe=$(mktemp -u "$startdir/logpipe.XXXXXXXX")
mkfifo "$logpipe"
- exec 3>&1
tee "$BUILDLOG" < "$logpipe" &
- exec 1>"$logpipe" 2>"$logpipe"
+ local teepid=$!
+
restoretrap=$(trap -p ERR)
trap 'error_function $pkgfunc' ERR
- $pkgfunc 2>&1
+ $pkgfunc &>"$logpipe"
eval $restoretrap
- sync
- exec 1>&3 2>&3 3>&-
+
+ wait $teepid
rm "$logpipe"
else
restoretrap=$(trap -p ERR)