Page MenuHomePhabricator

libssh 0.8.5 under Windows 10
Open, Needs TriagePublic

Description

Hello world,
I developping a putty like terminal with libssh and I got a problem in the bsd_poll() function:
Sometimes it hangs.

/* compute fd_sets and find largest descriptor */

nfds 1
fds[0] {fd=2712 events=0 revents=784 }

rc remains to -1
if (max_fd == SSH_INVALID_SOCKET || rc == -1) {

    errno = EINVAL;
    return -1;
}`

and the function bsd_poll() returns -1

To workaround this, I put the program into sleep for 200ms when it read 0 data length, but in that case the program is too slow.
What is wrong ?
Many thanks.

Event Timeline

Gilles_Pelletier added a project: Restricted Project.Wed, Dec 12, 12:00 PM

also seen with libssh 0.8.2