# HG changeset patch # User "Yann E. MORIN" # Date 1186509941 0 # Node ID e585ed10bd5bbfc5fc189a2d6d304b5c3db71dac # Parent b6b84ed2a59df73b112fb645ac8feca4e1d382d8 Make use of setsid to spawn removal processes: we don't want the rm's to stop if the main script fails and ends before all directories were removed. diff -r b6b84ed2a59d -r e585ed10bd5b scripts/crosstool.sh --- a/scripts/crosstool.sh Tue Aug 07 17:15:47 2007 +0000 +++ b/scripts/crosstool.sh Tue Aug 07 18:05:41 2007 +0000 @@ -147,7 +147,7 @@ if [ -d "${CT_BUILD_DIR}" ]; then mv "${CT_BUILD_DIR}" "${CT_BUILD_DIR}.$$" chmod -R u+w "${CT_BUILD_DIR}.$$" - nohup rm -rf "${CT_BUILD_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_BUILD_DIR}.$$" >/dev/null 2>&1 & fi # Don't eradicate directories if we need to restart @@ -158,28 +158,28 @@ if [ "${CT_FORCE_DOWNLOAD}" = "y" -a -d "${CT_TARBALLS_DIR}" ]; then mv "${CT_TARBALLS_DIR}" "${CT_TARBALLS_DIR}.$$" chmod -R u+w "${CT_TARBALLS_DIR}.$$" - nohup rm -rf "${CT_TARBALLS_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_TARBALLS_DIR}.$$" >/dev/null 2>&1 & fi if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.$$" chmod -R u+w "${CT_SRC_DIR}.$$" - nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 & fi if [ -d "${CT_INSTALL_DIR}" ]; then mv "${CT_INSTALL_DIR}" "${CT_INSTALL_DIR}.$$" chmod -R u+w "${CT_INSTALL_DIR}.$$" - nohup rm -rf "${CT_INSTALL_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_INSTALL_DIR}.$$" >/dev/null 2>&1 & fi if [ -d "${CT_DEBUG_INSTALL_DIR}" ]; then mv "${CT_DEBUG_INSTALL_DIR}" "${CT_DEBUG_INSTALL_DIR}.$$" chmod -R u+w "${CT_DEBUG_INSTALL_DIR}.$$" - nohup rm -rf "${CT_DEBUG_INSTALL_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_DEBUG_INSTALL_DIR}.$$" >/dev/null 2>&1 & fi # In case we start anew, get rid of the previously saved state directory if [ -d "${CT_STATE_DIR}" ]; then mv "${CT_STATE_DIR}" "${CT_STATE_DIR}.$$" chmod -R u+w "${CT_STATE_DIR}.$$" - nohup rm -rf "${CT_STATE_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_STATE_DIR}.$$" >/dev/null 2>&1 & fi fi @@ -364,7 +364,7 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then if [ "${CT_FORCE_EXTRACT}" = "y" ]; then mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.$$" - nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 + setsid nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 fi CT_DoStep INFO "Extracting and patching toolchain components" do_kernel_extract diff -r b6b84ed2a59d -r e585ed10bd5b tools/populate.in --- a/tools/populate.in Tue Aug 07 17:15:47 2007 +0000 +++ b/tools/populate.in Tue Aug 07 18:05:41 2007 +0000 @@ -71,7 +71,7 @@ # Get rid of potentially older destination directory if [ -d "${CT_ROOT_DST_DIR}" ]; then mv "${CT_ROOT_DST_DIR}" "${CT_ROOT_DST_DIR}.$$" - nohup rm -rf "${CT_ROOT_DST_DIR}.$$" >/dev/null 2>&1 & + setsid nohup rm -rf "${CT_ROOT_DST_DIR}.$$" >/dev/null 2>&1 & fi # Create the working copy