From e581068c77baa7a167662b0c63730dc87cc90b81 Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Tue, 27 Aug 2019 16:14:07 +1000 Subject: makepkg: Delete logpipe when exiting The logpipe fifo can remain when exiting on a non-error condition such as recieving signals INT and USR1. This can be seen by doing either a manual CTRL-C to interrupt the build or by sending a signal such as: $ makepkg & sleep 5 ; kill -USR1 $! Remove the fifo in all cases on script exit if it still exists. Signed-off-by: Austin Lund Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 43484db3..fac268a8 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -129,6 +129,10 @@ clean_up() { return 0 fi + if [[ -p $logpipe ]]; then + rm "$logpipe" + fi + if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && CLEANUP )); then local pkg file @@ -343,9 +347,6 @@ remove_deps() { } error_function() { - if [[ -p $logpipe ]]; then - rm "$logpipe" - fi # first exit all subshells, then print the error if (( ! BASH_SUBSHELL )); then error "$(gettext "A failure occurred in %s().")" "$1" -- cgit v1.2.3-70-g09d2