b6694df619
There's a long-standing bug in select. If we have poll-only descriptors in the fd set, select overwrites the incoming fd sets with the polling result. If none of the fds is ready, select has to loop again. But now the fd sets are set to all zero and select hangs. Fix this by utilizing the local fd sets r, w, e as storage for the incoming fd sets and use them to initialize select_stuff. If we have to loop, overwritung the incoming fd sets doesn't matter. While at it, rename r, w, e to readfds_in, writefds_in, exceptfds_in. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin