浏览代码

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.
Andreas Kling 5 年之前
父节点
当前提交
ef64e26317
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Kernel/TTY/MasterPTY.cpp

+ 1 - 1
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;
 }