mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
Allow character devices to block write attempts until there is more space.
This commit is contained in:
parent
49b63281a0
commit
e452303c66
21 changed files with 39 additions and 7 deletions
|
@ -36,6 +36,11 @@ bool MasterPTY::has_data_available_for_reading(Process&) const
|
|||
return !m_buffer.is_empty();
|
||||
}
|
||||
|
||||
bool MasterPTY::can_write(Process&) const
|
||||
{
|
||||
return m_buffer.bytes_in_write_buffer() < 4096;
|
||||
}
|
||||
|
||||
void MasterPTY::on_slave_write(const byte* data, size_t size)
|
||||
{
|
||||
m_buffer.write(data, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue