1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

PTY: Disallow infinite writing to slaves.

This way we don't buffer ungodly amounts of output in the kernel when doing
e.g "cat /dev/random" on a PTY.
This commit is contained in:
Andreas Kling 2019-01-25 00:13:54 +01:00
parent d7d78670c9
commit b896d4b237
3 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,7 @@ void SlavePTY::on_tty_write(const byte* data, size_t size)
m_master.on_slave_write(data, size);
}
bool SlavePTY::can_write(Process& process) const
bool SlavePTY::can_write(Process&) const
{
return m_master.can_write(process);
return m_master.can_write_from_slave();
}