[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]
Chris Fowler cfowler@outpostsentinel.com
Tue, 14 Dec 2010 22:23:27 GMT
On Tue, 2010-12-14 at 17:15 -0500, Chris Marget wrote: > > I've added two lines here. Seems to do what I need. Am I on the right track? > > static int screwy = 0; > <snip> > /* anything from stdin? */ > if (FD_ISSET(0, &rmask)) { > if ((nc = read(0, acMesg, sizeof(acMesg))) <= 0) { > if ( nc == 0 ) fprintf(stderr, "gotcha!\n"); // added by chris m > if ( nc == 0 ) break; // added by chris m > if (screwy) > break; > else { > FD_SET(0, &rinit); > continue; > } > } > Does the break terminate the program?