while(1){ wait for input via select process input }