I have a pipe in ubuntu, where syslog-ng writes in sometimes.
Now I want to open this pipe in an c++ program, and read the data line by line.
So this already works - but the problem is, when the pipe is empty, my program waits for a sign - or the EOF. (and wait and wait and wait)
So i never reach end with my trials. I tried with fgets() and getline(). The prog should check the pipe every 60 seconds.
Now I read, that in c-programming, I can use open(FIFO_NAME , O_NONBLOCK )...
I searched for this in c++, but get no match.