Hi,
I have opened a pipe (popen) to a program (ir-keytable), and need a way to test whether there's more data in the pipe or if it's empty.
Failing that, I need a way to clear all data in a pipe. regardless if there's data.
I can't seem to find a way to accomplish this.
I tried:
The only other option I can think of is to close the pipe and open it again for reading. But seems a bit wasteful.Code:fseek(pp, 0L, SEEK_END);
Hope someone might have a little knowledge to help shed some light.
Ty.