summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-24 20:54:35 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-24 20:54:35 +0200
commitef64e26317635b84f1f5351bc7cbe8ff5bbf92d6 (patch)
tree6c69221c6a62c7e145d4583cf1fdf9c1d663ac7c
parent272317bce27b9def41d0b5f53931bf90abb0bcba (diff)
downloadserenity-ef64e26317635b84f1f5351bc7cbe8ff5bbf92d6.zip
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.
-rw-r--r--Kernel/TTY/MasterPTY.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}