According to Ion Badulescu:
> In article <8pjlk6$vnf$[EMAIL PROTECTED]> you wrote:
> 
> >>However, ^C does not stop anything. No signal gets sent to anybody.
> >>I don't want to make it too large because it won't fit on a floppy
> >>if I do.
> > 
> > That means you don't have a controlling tty.
> 
> But why is /dev/console not a tty? Is there any good reason,
> or is just "because nobody has done it"?

It is a tty, it's just that if you open(2) it, it doesn't become
your _controlling_ tty by default. See drivers/char/tty_io.c (I
think, that's from the top of my head).

You can always force it to become the controlling tty using TIOCSCTTY,
but that is kind of hard in a shell script. But the trick with
reopening stdin/stdout/stderr using /dev/tty1 should work.

And indeed, as has been pointed out on this list, it could be
that /dev/console is actually /dev/lp0 which isn't a tty at all.
Could cause some weirdness - I never really tried it, or read that
part of the source code though

Mike.
-- 
Deadlock, n.:
        Deceased rastaman.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to