in reply to why don't you use fork ?
in thread Select on STDIN or ALARM?! For Win32 doesn't work!

sorry for that '´' in my reply