guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: linux-container: Mount a new /dev/pts instance in the container.


From: guix-commits
Subject: 01/01: linux-container: Mount a new /dev/pts instance in the container.
Date: Fri, 5 Jul 2019 18:27:04 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 935e79af61f4d903e562362cdd828be807e15581
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jul 6 00:18:18 2019 +0200

    linux-container: Mount a new /dev/pts instance in the container.
    
    Fixes <https://bugs.gnu.org/36463>.
    Reported by Steffen Rytter Postas <address@hidden>.
    
    * 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.
---
 gnu/build/linux-container.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index e86ac60..6ccb924 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]