Article View: comp.os.msdos.programmer
Article #5855Re: Sensing STDOUT redirection in C
From: John Allen on wsl
Date: Tue, 16 Apr 1991 15:39
Date: Tue, 16 Apr 1991 15:39
18 lines
908 bytes
908 bytes
Sorry that last post was incorrect.
if (isatty(1))
{
// has not been redirected
}
else
{
// has been redirected
}
Sorry for any confusion caused.
--
People that don't know want to know from the people that do know and if the
poeple that do know don't tell the people that don't know then the people
that don't know still won't know.
"Don't quote me on any issue whatsoever."
Technical Details
Message-ID:
<754@wsl.ie>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!wsl!jjaReferences:
<collinsa.671721083@p4.cs.man.ac.uk> <753@wsl.ie>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!wsl!jja From: jja@wsl.ie (John Allen on wsl) Newsgroups: comp.os.msdos.programmer Subject: Re: Sensing STDOUT redirection in C Keywords: STDOUT, Redirection, MSDOS Message-ID: <754@wsl.ie> Date: 16 Apr 91 15:39:04 GMT References: <collinsa.671721083@p4.cs.man.ac.uk> <753@wsl.ie> Organization: Workhorse Systems Limited, Dublin Lines: 18