Date: Tue, 6 May 1997 12:03:44 +0200 From: Marcin Citowicki Message-Id: <199705061003.MAA00182@icslab2.icslab.agh.edu.pl> To: djgpp AT delorie DOT com Subject: select & DJGPP Precedence: bulk Hi , I have problems with select function . Take a look at this : fd_set readset , writeset ; int max_fd=2; FD_ZERO(&readset); FD_ZERO(&writeset); FD_SET(fileno(stdin),&readset); FD_SET(fileno(stdout),&writeset); FD_SET(fileno(stderr),&writeset); select(max_fd+1,&readset,&writeset,NULL,0); if(FD_ISSET(fileno(stdin),&readset)) ... if(FD_ISSET(fileno(stdout),&writeset)) ... if(FD_ISSET(fileno(stderr),&writeset)) ... That if() ... part is never reached : select function returns EBADF error . Could you tell me why this happens and how to make it work ? I need that very much . Yours , Marcin miki AT icslab8 DOT isclab DOT agh DOT edu DOT pl