You can use the fstat libc function on stdin fd to get various information on whatever is backing stdin, including the file type.
↧
You can use the fstat libc function on stdin fd to get various information on whatever is backing stdin, including the file type.