lkml.org 
[lkml]   [2000]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Booting into /bin/bash
According to Ion Badulescu:
> In article <8pjlk6$vnf$1@enterprise.cistron.net> 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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.048 / U:14.728 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site