mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
Kernel: Fix condition for write to succeed on pseudoterminal
As "\n" is translated to "\r\n" in TTYs, the condition for a write to succeed on a pseudoterminal should check if the underlying buffer has 2 bytes empty rather than 1. Fixes SerenityOS#18888
This commit is contained in:
parent
d7c1a1ecac
commit
fb4a20ade5
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ bool MasterPTY::can_write_from_slave() const
|
|||
{
|
||||
if (m_closed)
|
||||
return true;
|
||||
return m_buffer->space_for_writing();
|
||||
return m_buffer->space_for_writing() >= 2;
|
||||
}
|
||||
|
||||
ErrorOr<void> MasterPTY::close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue