- errno = 0; /* clear from sleep, close, whatever */
- /* and now the big ol' select shoveling loop ... */
- while (FD_ISSET(netfd, &ding1)) { /* i.e. till the *net* closes! */
- wretry = 8200; /* more than we'll ever hafta write */
- if (wfirst) { /* any saved stdin buffer? */
- wfirst = 0; /* clear flag for the duration */
- goto shovel; /* and go handle it first */
- }
- ding2 = ding1; /* FD_COPY ain't portable... */
- /* some systems, notably linux, crap into their select timers on return, so
- we create a expendable copy and give *that* to select. */
+ /* and now the big ol' shoveling loop ... */
+ /* nc 1.10 has "while (FD_ISSET(netfd)" here */
+ while (fds_open) {
+ int rr;
+ int poll_tmout_ms;
+ unsigned wretry = 8200; /* net-write sanity counter */
+
+ poll_tmout_ms = -1;