From d7db4e6147dc5bb573c4e05f1fca82067db5b22e Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 16 Sep 2023 11:47:43 +0200 Subject: [PATCH] init: Mount /dev/pts on startup --- apps/init.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/init.cpp b/apps/init.cpp index c0ee8ec6..f7f4015b 100644 --- a/apps/init.cpp +++ b/apps/init.cpp @@ -339,6 +339,13 @@ static void mount_shmfs() if (chmod("/dev/shm", 01777) < 0) exit(255); } +static void mount_devpts() +{ + if (mkdir("/dev/pts", 0755) < 0) exit(255); + + if (mount("/dev/pts", "devpts", "devpts") < 0) exit(255); +} + Result sysinit(StringView path) { if (getpid() != 1) @@ -359,6 +366,7 @@ Result sysinit(StringView path) mount_tmpfs(); mount_shmfs(); + mount_devpts(); umask(022);