|I kind of doubt that getline will wait for data as it has no way of knowing how
much data to expect.
A quick search for Linux and Delay turned up a sleep() command that may be what you need.
Also a search of "Linux synchronous serial port PIC" showed several of examples where they went through the process of setting the parameters for the serial port and running a loop to retrieve data.
Something like (pseudo code):
if char == "\n"
You would probably read the text and convert back to integer.
You might try that search.
Hope this helps.