hi, i wanted to emulate a terminal that asked for a user input, like login name, but doesn't wait for it indefinitely. a timer runs in the background and if no hit is received from the keyboard before the before the timer expires the program exits with default values. kinda like the grub timer.
so i implemented this using both fork() and threads separately. is there any function that can get this done without any of these methods, i.e. is there any way for a single process with single thread to work this out??