Article View: comp.os.msdos.programmer
Article #1813Re: How to detect redirection?
From: Jeffrey R Stone
Date: Wed, 08 Aug 1990 03:06
Date: Wed, 08 Aug 1990 03:06
14 lines
954 bytes
954 bytes
lai@math.sdsu.edu (Henry Lai ) writes:
>In article <1426@wet.UUCP> naga@wet.UUCP (Peter Davidson) writes:
[ question about how to detect that stdout has been redirected ]
> isatty (fileno (stdout))
>will return zero if stdout has been redirected to a file. See the
>reference to isatty in your run-time library reference.
According to Turbo C's library reference, isatty() returns TRUE if
it argument file pointer is a character devuce - A tty - not necessarily
THE tty.
-jeff-
Technical Details
Message-ID:
<1990Aug8.030621.24021@world.std.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!world!jstoneReferences:
<1426@wet.UUCP> <1990Aug8.012021.19429@ucselx.sdsu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!world!jstone From: jstone@world.std.com (Jeffrey R Stone) Newsgroups: comp.os.msdos.programmer Subject: Re: How to detect redirection? Message-ID: <1990Aug8.030621.24021@world.std.com> Date: 8 Aug 90 03:06:21 GMT References: <1426@wet.UUCP> <1990Aug8.012021.19429@ucselx.sdsu.edu> Distribution: na Organization: The World @ Software Tool & Die Lines: 14