- FD_ZERO( &gptr->readfds ); // reset the read and write sets
- FD_ZERO( &gptr->writefds );
- FD_ZERO( &gptr->execpfds );
-
- for( tpptr = gptr->tplist; tpptr != NULL; tpptr = nextb ) {
- nextb = tpptr->next;
- if( tpptr->flags & TPF_DELETE ) {
- SIterm( gptr, tpptr );
- } else {
- if( tpptr->fd >= 0 ) { // if valid file descriptor
- if( tpptr->fd >= gptr->fdcount ) {
- gptr->fdcount = tpptr->fd + 1; // save largest fd (+1) for select
- }
-
- FD_SET( tpptr->fd, &gptr->execpfds ); // set all fds for execpts
-
- if( !(tpptr->flags & TPF_DRAIN) ) { // if not draining
- FD_SET( tpptr->fd, &gptr->readfds ); // set test for data flag
- }
-
- if( tpptr->squeue != NULL ) { // stuff pending to send ?
- FD_SET( tpptr->fd, &gptr->writefds ); // set flag to see if writable
- }
+ for( tpptr = gptr->tplist; tpptr != NULL; tpptr = nextb ) {
+ nextb = tpptr->next;
+ if( tpptr->flags & TPF_DELETE ) {
+ SIterm( gptr, tpptr );
+ } else {
+ if( tpptr->fd >= 0 ) { // if valid file descriptor
+ if( tpptr->fd >= gptr->fdcount ) {
+ gptr->fdcount = tpptr->fd + 1; // save largest fd (+1) for select