1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Simplify exit status fix, restore interruptability

The exit status fix introduced in cherry-picked commit 22c3a6e1
introduced a problem: interrupting the build only interrupted the
main process, and the background job would happily continue.

bin/package, src/cmd/INIT/package.sh:
- Give up on the idea of a background job and put up with not
  cleaning up the FIFO. It's in a build directory that is going to
  get cleaned up anyway.
This commit is contained in:
Martijn Dekker 2020-06-11 20:58:24 +02:00
parent 7a8a46700c
commit 936802f92a
2 changed files with 6 additions and 6 deletions

View file

@ -3969,6 +3969,8 @@ capture() # file command ...
0) if executable ! $TEE
then TEE=tee
fi
# Connect 'tee' to a FIFO instead of a pipe, so that the build is invoked from
# the main shell environment and its exit status can be used for $error_status
rm -f $o.fifo
mkfifo -m 600 $o.fifo || exit
$TEE -a $o < $o.fifo &
@ -3978,9 +3980,7 @@ capture() # file command ...
esac
showenv $action
"$@"
} > $o.fifo 2>&1 &
rm $o.fifo # unlink early
wait "$!" # get build's exit status
} < /dev/null > $o.fifo 2>&1
;;
*) {
case $s in

View file

@ -3968,6 +3968,8 @@ capture() # file command ...
0) if executable ! $TEE
then TEE=tee
fi
# Connect 'tee' to a FIFO instead of a pipe, so that the build is invoked from
# the main shell environment and its exit status can be used for $error_status
rm -f $o.fifo
mkfifo -m 600 $o.fifo || exit
$TEE -a $o < $o.fifo &
@ -3977,9 +3979,7 @@ capture() # file command ...
esac
showenv $action
"$@"
} > $o.fifo 2>&1 &
rm $o.fifo # unlink early
wait "$!" # get build's exit status
} < /dev/null > $o.fifo 2>&1
;;
*) {
case $s in