[klibc] klibc shell (was Re: [PATCH v2 5/5] Clean up clang warnings)

Thorsten Glaser tg at debian.org
Sat Mar 28 17:32:38 PDT 2020

Ben Hutchings dixit:

>same way.  The reason I haven't done so already is that I don't have
>regression tests for dash.

There’s another shell that works well with klibc, is small enough…
well 164728 bytes over 70492 of dash on i386, so factor 2.3 as big
but still tiny compared to others (another 4172 bytes smaller if
linked with -shared), and this one does have regression tests. It
lacks a printf builtin, but one can be added, for 2769 bytes .text
and 32 bytes .bss more — a bargain ☺

I’ve been running my Debian systems with mksh as /bin/sh (well, the
lksh binary, which enables 'set -o posix' when run as sh, uses the
“long” type for arithmetics as POSIX demands, contains workarounds
for underquoting in common maintainer scripts, and ships the printf
builtin) for quite long (since about lenny, Sep 2008), so it’s got
quite some exposure. (It’s also /system/bin/sh on Android, so…)

Drop me a message if there’s actual interest in integrating mksh.

„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
	-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)

More information about the klibc mailing list