Skip to content

Commit

Permalink
Merge pull request #75 from dscho/fix-ssh-hangs
Browse files Browse the repository at this point in the history
Fix SSH hangs
  • Loading branch information
dscho committed Dec 24, 2024
2 parents cae4abc + 67bdfc7 commit ff2b7c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions winsup/cygwin/select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ peek_pipe (select_record *s, bool from_select)
}
ssize_t n = pipe_data_available (s->fd, fh, h, PDA_SELECT | PDA_WRITE);
select_printf ("write: %s, n %d", fh->get_name (), n);
gotone += s->write_ready = (n >= PIPE_BUF);
gotone += s->write_ready = (n > 0);
if (n < 0 && s->except_selected)
gotone += s->except_ready = true;
}
Expand Down Expand Up @@ -990,7 +990,7 @@ peek_fifo (select_record *s, bool from_select)
ssize_t n = pipe_data_available (s->fd, fh, fh->get_handle (),
PDA_SELECT | PDA_WRITE);
select_printf ("write: %s, n %d", fh->get_name (), n);
gotone += s->write_ready = (n >= PIPE_BUF);
gotone += s->write_ready = (n > 0);
if (n < 0 && s->except_selected)
gotone += s->except_ready = true;
}
Expand Down Expand Up @@ -1416,7 +1416,7 @@ peek_pty_slave (select_record *s, bool from_select)
{
ssize_t n = pipe_data_available (s->fd, fh, h, PDA_SELECT | PDA_WRITE);
select_printf ("write: %s, n %d", fh->get_name (), n);
gotone += s->write_ready = (n >= PIPE_BUF);
gotone += s->write_ready = (n > 0);
if (n < 0 && s->except_selected)
gotone += s->except_ready = true;
}
Expand Down

0 comments on commit ff2b7c9

Please sign in to comment.