diff options
author | epoch <epoch@hack.thebackupbox.net> | 2019-06-24 05:45:57 +0000 |
---|---|---|
committer | epoch <epoch@hack.thebackupbox.net> | 2019-06-24 05:45:57 +0000 |
commit | ac184f83e4786219103701c78ab82b188b093133 (patch) | |
tree | 161b0367fd7ab4b457f437855813ea0ccbfb73bf | |
parent | 142e7c78f554897079d977f99b909ab7d66da978 (diff) | |
download | libidc-ac184f83e4786219103701c78ab82b188b093133.tar.gz libidc-ac184f83e4786219103701c78ab82b188b093133.zip |
testing out select without reading
-rw-r--r-- | libidc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -181,10 +181,10 @@ int select_on_everything() { if(idc.fds[i].fd == -1) continue;//skip -1s if(!FD_ISSET(idc.fds[i].fd,&readfs)) continue;//did not find one. hurry back to the for loop j--;//we found one. trying to get j==0 so we can get out of here early. - //if(idc.fds[i].read_lines_for_us == 0) { - // idc.fds[i].line_handler(&idc.fds[i],0);//the line pointer is null. - // continue;//we don't need to read the line. - //} + if(idc.fds[i].read_lines_for_us == 0) { + idc.fds[i].line_handler(&idc.fds[i],"");//the line pointer is null. which also is EOF? we'll know what it means. + continue;//we don't need to read the line. + } fprintf(stderr,"attempting to read from fd: %d\n",idc.fds[i].fd); if((n=read(idc.fds[i].fd,idc.fds[i].buffer,CHUNK)) < 0) { snprintf(tmp,sizeof(tmp)-1,"fd %d: read perror:",idc.fds[i].fd);//hopefully this doesn't error and throw off error messages. |