From ef64e26317635b84f1f5351bc7cbe8ff5bbf92d6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 24 Oct 2019 20:54:35 +0200 Subject: [PATCH] TTY: Forward TIOCGPGRP from MasterPTY to SlavePTY This makes tcgetpgrp() on a master PTY return the PGID of the slave PTY which is probably what you are looking for. I'm not sure how correct or standardized this is, but it makes sense to me right now. --- Kernel/TTY/MasterPTY.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index a3caf1b17b..cace566a99 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -98,7 +98,7 @@ void MasterPTY::close() int MasterPTY::ioctl(FileDescription& description, unsigned request, unsigned arg) { - if (request == TIOCSWINSZ) + if (request == TIOCSWINSZ || request == TIOCGPGRP) return m_slave->ioctl(description, request, arg); return -EINVAL; }