Detect pipe from running C program
I'm looking for a way to detect whether or not a program has been called from pipe, e.g.
Code:
whatever | my_program Code:
my_program Code:
if( stream_buffer_is_not_empty() ) Thanks to you! Jameson |
Code:
#include <stdio.h> |
All times are GMT -5. The time now is 08:46 PM. |