mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
TTY: MasterPTY should fail to ioctl() if slave is gone
Just fail with EIO in that case.
This commit is contained in:
parent
bced810880
commit
5c3647b8a3
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,8 @@ void MasterPTY::close()
|
|||
|
||||
int MasterPTY::ioctl(FileDescription& description, unsigned request, unsigned arg)
|
||||
{
|
||||
if (!m_slave)
|
||||
return -EIO;
|
||||
if (request == TIOCSWINSZ || request == TIOCGPGRP)
|
||||
return m_slave->ioctl(description, request, arg);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Reference in a new issue