#include <stdio.h>
#include <stdlib.h>
#include <poll.h>
#include <unistd.h>
int main(){
printf("Dzialaj");
while(1){
struct pollfd mypoll = { STDIN_FILENO,POLLIN|POLLPRI};
char string[10];
if( poll(&mypoll,1,2000)){
scanf("%9s",string);
printf("read string - %s\n",string);
}
else{
puts("Read nothink");
}
}
return 0;
}