Ver código fonte

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 anos atrás
pai
commit
ef64e26317
1 arquivos alterados com 1 adições e 1 exclusões
  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)
 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 m_slave->ioctl(description, request, arg);
     return -EINVAL;
     return -EINVAL;
 }
 }