summaryrefslogtreecommitdiff
path: root/gnu/build/linux-container.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-06 00:18:18 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-06 00:26:58 +0200
commit935e79af61f4d903e562362cdd828be807e15581 (patch)
tree0a0490566534c4c16c322c58e3dc6da1eff13dda /gnu/build/linux-container.scm
parentc356e5f7a08f6f0c8780bdcd501702c0b2b4af3c (diff)
linux-container: Mount a new /dev/pts instance in the container.
Fixes <https://bugs.gnu.org/36463>. Reported by Steffen Rytter Postas <nc@scalehost.eu>. * gnu/build/linux-container.scm (mount-file-systems): When /dev/ptmx exists on the host, explicitly mount a new instance of devpts and make /dev/ptmx a symlink to /dev/pts/ptmx.
Diffstat (limited to 'gnu/build/linux-container.scm')
-rw-r--r--gnu/build/linux-container.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index e86ac606c0..6ccb924861 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -130,9 +130,14 @@ for the process."
"/dev/random"
"/dev/urandom"
"/dev/tty"
- "/dev/ptmx"
"/dev/fuse"))
+ ;; Mount a new devpts instance on /dev/pts.
+ (when (file-exists? "/dev/ptmx")
+ (mount* "none" (scope "/dev/pts") "devpts" 0
+ "newinstance,mode=0620")
+ (symlink "/dev/pts/ptmx" (scope "/dev/ptmx")))
+
;; Setup the container's /dev/console by bind mounting the pseudo-terminal
;; associated with standard input when there is one.
(let* ((in (current-input-port))