Re: [dev] System shell for sta.li

From: Thorsten Glaser <tg_AT_mirbsd.de>
Date: Sat, 27 Apr 2013 21:00:44 +0000 (UTC)

Jens Staal dixit:

> Sorry for taking this out of context (and on the wrong list), but I built mksh
> (now a relatively old version 40f) for Plan9/APE (using the native "cc" front
> end to the plan9 compilers) in the hope to replace the old pdksh "sh" command
> there.

Yeah, I did that too. With ed, as I don’t get either sam or acme.

> using -DMKSH_NOPROSPECTOFWORK, a (as far as I remember) unmodified mksh builds
> and executes without complaining about absence of tty:s.

The problem is that -DMKSH_NOPROSPECTOFWORK is not enough for a working
mksh, it’s more or less a porting tool. If a specific behaviour exists
without it but not with it, chances are it’s a kernel (in this case APE)
bug: when you run a command, the shell doesn't return afterwards.

We had that in Haiku, and when told at Chemnitzer Linux-Tage, they fixed
their kernel bug overnight; mksh works on it ever since.

(With -DMKSH_NOPROSPECTOFWORK things like co-processes don’t work, and
who knows what else. The testsuite also hangs somewhere.)

> Interestingly however, what happens if executing a command in this shell is
> that the shell returns the written command with every character duplicated
> (example: "exit" writes out "eexxiitt" before exiting the shell).

Might be the terminal code. For Plan 9 you really need
-DMKSH_NO_CMDLINE_EDITING since the terminal is “really dumb”.

There’s a branch tg-mksh-plan9ape in CVS, though that’s older
than mksh R28… I vaguely remember changing other things, back
then. Never got really far, and -DMKSH_NOPROSPECTOFWORK just
isn’t enough to call it a working port.

But if you want to work on it, you’re most definitely welcome!

bye,
//mirabilos
-- 
22:59⎜<Vutral> glaub ich termkit is kompliziert | glabe nicht das man
damit schneller arbeitet | reizüberflutung │ wie windows │ alles evil
zuviel bilder │ wie ein spiel | 23:00⎜<Vutral> die meisten raffen auch
nicht mehr von windows | 23:01⎜<Vutral> bilderbücher sind ja auch nich
wirklich verbreitet als erwachsenen literatur	‣ who needs GUIs thus?
Received on Sat Apr 27 2013 - 23:00:44 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 27 2013 - 23:12:05 CEST