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
In POSIX, you can use isatty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With