Fix pty(4) controlling write condition.

This commit is contained in:
Jonas 'Sortie' Termansen 2024-05-11 10:00:47 +00:00
parent c488b8a8fc
commit 9c5ea68951
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ ssize_t PTY::master_write(ioctx_t* ctx, const uint8_t* buf, size_t count)
{
if ( ctx->dflags & O_NONBLOCK )
return errno = EWOULDBLOCK, -1;
if ( !kthread_cond_wait_signal(&output_ready_cond, &termlock) )
if ( !kthread_cond_wait_signal(&output_possible_cond, &termlock) )
return errno = EINTR, -1;
}
size_t sofar = 0;