When my program begins, I want to allow the user to hit a key to enter debug mode for one of the modules. Many of the solutions (involving alarm(), in particular) seemed complicated and involved multiple functions. Instead, I adapted this answer:
// Check to see if we should enter GSM de-bug mode
fd_set          s;
struct timeval  timeout;
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
int i = 100000;
do {
    printf("Press [ENTER] for GSM debug mode... %i  \r",i/10000); 
    fflush(stdout);
    FD_ZERO(&s);
    FD_SET(STDIN_FILENO, &s);
    select(STDIN_FILENO+1, &s, NULL, NULL, &timeout);
    i--;
} while (FD_ISSET(STDIN_FILENO, &s) == 0 && i > 0);
if ( i <= 0 ) { printf("\nSkipping debug mode...\n"); }
else 
{ 
    printf("\nEntering debug mode...\n"); 
    // fill in the debug code here
}
This code works, based on a few quick tests, and exhibits the behavior I want. But, have I created any problems for myself?