diff --git a/tinyx/patches/st/0.2/04-tiocstty.patch b/tinyx/patches/st/0.2/04-tiocstty.patch new file mode 100644 index 0000000..f835de7 --- /dev/null +++ b/tinyx/patches/st/0.2/04-tiocstty.patch @@ -0,0 +1,12 @@ +diff -ruN a/st.c b/st.c +--- a/st.c 2024-09-02 10:01:36.967676919 +0200 ++++ b/st.c 2024-09-02 11:46:12.263350519 +0200 +@@ -708,6 +709,8 @@ + dup2(s, STDIN_FILENO); + dup2(s, STDOUT_FILENO); + dup2(s, STDERR_FILENO); ++ if(ioctl(s, TIOCSCTTY, NULL) < 0) ++ die("ioctl TIOCSCTTY failed: %s\n", SERRNO); + close(s); + close(m); + execsh(); diff --git a/tinyx/patches/tinyx/eed490/13-tiocnotty.patch b/tinyx/patches/tinyx/eed490/13-tiocnotty.patch new file mode 100644 index 0000000..b001fe9 --- /dev/null +++ b/tinyx/patches/tinyx/eed490/13-tiocnotty.patch @@ -0,0 +1,29 @@ +diff -ruN a/kdrive/phoenix/phoenix.c b/kdrive/phoenix/phoenix.c +--- a/kdrive/phoenix/phoenix.c 2024-09-02 10:24:29.020264244 +0200 ++++ b/kdrive/phoenix/phoenix.c 2024-09-02 11:36:26.806165111 +0200 +@@ -4,6 +4,7 @@ + #include "kdrive.h" + #include + #include ++#include + #include + #include + #include +@@ -14,6 +15,17 @@ + + static int PhoenixInit(void) + { ++ int fd; ++ if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) { ++ FatalError("PhoenixInit: Cannot open /dev/tty0 (%s)\n", ++ strerror(errno)); ++ } ++ ++ if (ioctl(fd, TIOCNOTTY, NULL) < 0) { ++ FatalError("PhoenixInit: TIOCNOTTY failed\n"); ++ } ++ close(fd); ++ + return 1; + } +