Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/mkarchroot.in
diff options
context:
space:
mode:
Diffstat (limited to 'mkarchroot.in')
-rw-r--r--mkarchroot.in12
1 files changed, 1 insertions, 11 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index 76ad840..022943e 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -183,17 +183,7 @@ trap_chroot_umount () {
}
chroot_lock () {
- # Only reopen the FD if it wasn't handed to us
- if [[ $(readlink -f /dev/fd/9) != "${working_dir}.lock" ]]; then
- exec 9>"${working_dir}.lock"
- fi
-
- # Lock the chroot. Take note of the FD number.
- if ! flock -n 9; then
- stat_busy "Locking chroot"
- flock 9
- stat_done
- fi
+ lock_open_write 9 "${working_dir}.lock" "Locking chroot"u
}
chroot_run() {