How can I tell, in Linux in C, whether stdout and stderr are redirected to a file vs. an interactive shell? I tried playing with stat(2) and the st_mode, but I'm not getting the results I expect.
Thanks! --Dave P.S. I'm doing this because I want to disable colors if my output is going to a file, but enable colors if it's a shell. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
