Basically I’m trying to check if anything is in stdin when the program is called, so if I’ve got another file called output that writes to stdout then
./output | ./program should work and ./program should exit with an error
Basically I’m trying to check if anything is in stdin when the program is
Share
In POSIX, you can use
isatty.