mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
TTY: MasterPTY should fail to ioctl() if slave is gone
Just fail with EIO in that case.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user