regading detection of stdin

Adam D. Ruppe destructionator at gmail.com
Sat Dec 7 18:19:07 PST 2013


On Sunday, 8 December 2013 at 02:11:01 UTC, Hugo Florentino wrote:
> Interesting, thanks for pointing that (this function is not 
> described at all in the source code)

Yeah, it is a standard unix function so D  itself doesn't 
document it, but you can run "man isatty" in Linux or search for 
isatty on the web and get info that way.

> Now, would that work regardless of the terminal number ther 
> user is in (ie tty1, tty2...)?

Yes.

> Also, is there a way to do accomplish the same in Windows?'

I don't think so, but not sure. This is a bit of a strange way to 
use this, since commonly when something wants info from stdin, 
taking it from the keyboard is perfectly acceptable.


More information about the Digitalmars-d-learn mailing list