[Toybox] Some questions re: init...
David Seikel
onefang at gmail.com
Sun Jan 5 22:23:48 PST 2014
On Mon, 06 Jan 2014 00:07:51 -0600 Rob Landley <rob at landley.net> wrote:
> On 01/05/14 20:31, ibid.ag at gmail.com wrote:
> > On Sun, Jan 05, 2014 at 11:49:31AM -0600, Rob Landley wrote:
> >> I'm pretty happy just hardwiring in TERM=linux if it's not already
> >> set. (Although possibly this is the shell's job and not init's? Sad
> >> there's no spec for init...)
> >
> > The shell doesn't set TERM; it reads it.
> > It's the job of "whatever provides a tty", which in this case means
> > init is on the hook.
>
> I was recently looking at login, which can also set it. And getty can
> set it too. (I wonder what upstart, openrc, and android's init do?)
>
> These days termio is all software talking to other software, we
> emulate terminals so terminal emulators can parse the data, they just
> have to agree on it. There aren't anymore vt100 tn3270 or ASR33
> teletypes lying around anymore. It's possible that minicom is brain
> damaged and hardwired, but the microcom in busybox just dumps I/O to
> the terminal it's running in. Same for netcat in toybox. Those can
> handle TERM=linux on a serial line. And qemu's -nographic mode
> connecting /dev/console to stdin and stdout works with TERM=linux on
> the (emulated) serial line.
>
> So I don't see a big reason not to hardwire TERM=linux and if
> somebody does need to set it to vt102, gettty or login can do that...
My editor code just ignores TERM, and uses a few very common escape
sequences to drive what ever pretend terminal you are using. I doubt
if anything else inside toybox cares either.
--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140106/9b224d82/attachment-0002.sig>
More information about the Toybox
mailing list