Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Could multios response positively to isatty(1) test?



On Thu, 2019-02-07 at 18:55 +0100, Sebastian Gniazdowski wrote:
> On Thu, 7 Feb 2019 at 17:50, Peter Stephenson <
> p.stephenson@xxxxxxxxxxx> wrote:
> > 
> > isatty() is part of the operating system, it doesn't have a way of
> > checking for "not a real TTY but pretending to be one except
> > actually it
> > isn't really even pretending to be one but it might work anyway"
> 
> Yes it's a part of the operating system, and i wonder how it works? I
> suspect that there's just a flag needed to be set on the FD exposed
> to
> the application.

It boils down to ioctl(TCGETS) on linux if you have to know.
It the same ioctl as the one used for tcsetattr/tcgetattr.

Have you tried:
  script -c "scrapy crawl $options[@]" log.txt

Phil.



Messages sorted by: Reverse Date, Date, Thread, Author