Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - select() call is not working: Page 1 of 3 (3 Items)
   
select() call is not working  
HI,
 any one can help on this.
select() call is not working on file descriptors. it is not all blocking.

#include<sys/select.h>
#include <sys/syspage.h>
#include <fcntl.h>
#include"nipcinternonblk.h"


int main(int argc, char *argv[]) {
	
	int sel_res, fd;
	fd_set rd_set;

	fd = open("/tmp/tst",O_RDWR );
	
	
while(1)
{
	printf("entered whl loop\n");
	FD_ZERO(&rd_set);
                FD_SET(fd,&rd_set);
	sel_res = select(FD_SETSIZE, &rd_set,NULL,NULL,NULL);
	printf("select val:%d\n",sel_res);-----------> always giving 1
	if(FD_ISSET(chid, &rd_set ))
                          do something..............

}
}