syscalls: 'terminal-dimension' ignores EPERM.
authorLudovic Courtès <ludo@gnu.org>
Fri, 29 May 2020 14:44:27 +0000 (16:44 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 29 May 2020 16:31:38 +0000 (18:31 +0200)
Fixes <https://bugs.gnu.org/41581>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/build/syscalls.scm (terminal-dimension): Add EPERM to the list of
errno code for FALL-BACK.

guix/build/syscalls.scm

index 6be322d..d69b178 100644 (file)
@@ -2052,8 +2052,8 @@ correspond to a terminal, return the value returned by FALL-BACK."
         ;; would return EINVAL instead in some cases:
         ;; <https://bugs.ruby-lang.org/issues/10494>.
         ;; Furthermore, some FUSE file systems like unionfs return ENOSYS for
-        ;; that ioctl.
-        (if (memv errno (list ENOTTY EINVAL ENOSYS))
+        ;; that ioctl, and bcachefs returns EPERM.
+        (if (memv errno (list ENOTTY EINVAL ENOSYS EPERM))
             (fall-back)
             (apply throw args))))))