Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!unm-la!lanl!cmcl2!adm!xadmx!Pabbisetty.henr@xerox.com From: Pabbisetty.henr@xerox.com (Nagesh Pabbisetty) Newsgroups: comp.unix.questions Subject: Re: correct isatty usage Message-ID: <18432@adm.BRL.MIL> Date: 22 Feb 89 14:17:22 GMT Sender: news@adm.BRL.MIL Lines: 23 > I am trying to use this invokation: > > if (isatty (stdin)) Use the following segment of code: if (isatty(fileno(stdin))) { printf("Hello> "); fflush(stdout); } Reason why (isatty (stdin)) will not work: isatty requires a file descriptor as an argument but you were trying to use it with a file pointer. Hope this helps... Nagesh 716-427-1827 / 5458