My question is I have this chunk of code my timeout works fine so I haven't mentioned all its things. When I call stop() I should get out of the start function. Right now I am getting stuck at my select till my timeout. How should i write to the filedesc from my stop function.
static int filedesc = STDIN_FILENO;
start()
{ fd_set set;
FD_ZERO(&set);
FD_SET(filedesc, &set);
while(something)
{
select(FD_SETSIZE, &set, NULL, NULL, timeout);
}
pthread_exit(NULL);
}
stop()
{
something = FALSE;
pthread_join(start, NULL);
}