syscalls: Pass the right 'throw' arguments in 'call-with-file-lock/no-wait'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 19 Jan 2020 21:42:27 +0000 (22:42 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 19 Jan 2020 22:11:37 +0000 (23:11 +0100)
Reported by Matt Wette <matt.wette@gmail.com>
in <https://bugs.gnu.org/39194>.

* guix/build/syscalls.scm (call-with-file-lock/no-wait): When
re-throwing, pass KEY in addition to ARGS.

guix/build/syscalls.scm

index 248d676..ae79a97 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -1140,7 +1140,7 @@ exception if it's already taken."
                       ;; at this point.
                       (if (= ENOSYS (system-error-errno (cons key args)))
                           #f
-                          (apply throw args)))
+                          (apply throw key args)))
                     (_ (apply throw key args)))))))
     (dynamic-wind
       (lambda ()