How to read from serial in c ? (under linux)

Phate867:
how to know if I'm reading the same integer or a new one?

You wrote the program that is sending them, so send them in a way that lets your receiving code detect the boundary between numbers. For example, if you're sending the numbers as an ASCII sequence of decimal digits, you could use any non-digit character(s) as a separator. Comma and/or a line feed would be obvious candidates.