public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Ken Brown <kbrown@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: select: set_bits: fix return value Date: Wed, 7 Apr 2021 15:47:28 +0000 (GMT) [thread overview] Message-ID: <20210407154728.20450385702D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=436e47584ae7aecf0ec22a98384a3348d244471f commit 436e47584ae7aecf0ec22a98384a3348d244471f Author: Ken Brown <kbrown@cornell.edu> Date: Wed Apr 7 11:43:27 2021 -0400 Cygwin: select: set_bits: fix return value If a socket descriptor is set to ready for reading on a failed connect, increment the return value. Diff: --- winsup/cygwin/select.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b493ccc11..8ad982c12 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -527,7 +527,10 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds, /* Set readfds entry in case of a failed connect. */ if (!me->read_ready && me->read_selected && sock->connect_state () == connect_failed) - UNIX_FD_SET (me->fd, readfds); + { + UNIX_FD_SET (me->fd, readfds); + ready++; + } } ready++; }
reply other threads:[~2021-04-07 15:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210407154728.20450385702D@sourceware.org \ --to=kbrown@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).