From f832dd42a85023943ad72f207a2a3e55048a4728 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Dec 2010 22:55:17 +0100 Subject: [PATCH] xbps-src: be more conservative with signal handlers. --- xbps-src/shutils/chroot.sh.in | 2 +- xbps-src/shutils/pkgtarget_funcs.sh.in | 6 +++--- xbps-src/xbps-src.sh.in | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 1efd0fcf2a2..2259b3ccf1d 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -28,7 +28,7 @@ # Actually this needs the xbps-base-chroot package installed. # -trap "echo && chroot_handler_interrupted $?" INT QUIT TERM KILL +trap "echo && chroot_handler_interrupted $?" INT QUIT TERM [ -n "$base_chroot" ] && return 0 diff --git a/xbps-src/shutils/pkgtarget_funcs.sh.in b/xbps-src/shutils/pkgtarget_funcs.sh.in index d54ceff09de..dcb499aed57 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh.in +++ b/xbps-src/shutils/pkgtarget_funcs.sh.in @@ -124,14 +124,14 @@ install_pkg() # Always write metadata to package's destdir. . $XBPS_SHUTILSDIR/metadata.sh - trap 'remove_pkgdestdir_sighandler ${pkgname}' 0 INT + trap 'remove_pkgdestdir_sighandler ${pkgname}' INT xbps_write_metadata_pkg if [ $? -ne 0 ]; then msg_red "cannot write package metadata for '$pkgname'!\n" - trap '' 0 INT + trap - INT return 1 fi - trap '' 0 INT + trap - INT [ "$install_destdir_target" = "yes" ] && return 0 diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index ad6cdf3a2fb..054eb05f3a0 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -43,8 +43,7 @@ sighandler_exit() env MASTERDIR="${_MASTERDIR}" \ @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount fi - [ -n "$1" ] && exit $1 - exit $? + exit $1 } check_reqhost_utils()