Detecting console output

Chris plug.org at 2nerds.com
Fri Feb 19 18:16:07 MST 2010


On Fri, Feb 19, 2010 at 5:51 PM, Dave Smith <dave at thesmithfam.org> wrote:

> How can I tell, in Linux in C, whether stdout and stderr are redirected
> to a file vs. an interactive shell?


isatty(fileno(stdout))



More information about the PLUG mailing list