[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Really wierd 'more' interaction with 'newrole' and stderr...



On Fri, 26 May 2006 13:53:47 EDT, Michael Sweet said:

> But don't programs like "more" open /dev/tty?

What 'more' uses:

int readch () {
        unsigned char c;

        errno = 0;
        if (read (fileno(stderr), &c, 1) <= 0) {
                if (errno != EINTR)
                        end_it(0);
                else
                        c = otty.c_cc[VKILL];
        }
        return (c);
}

There's only one reference to /dev/tty, and it's re-opening stdin
to /dev/tty when spawning a 'vi'.


Attachment: pgpXqcZU5dzVV.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]