ksh for 2.11BSD

86 views
Skip to first unread message

John D. Bruner

unread,
Jan 3, 2026, 1:13:40 PMJan 3
to [PiDP-11]
In case anyone is interested, I've back-ported (pd)ksh from NetBSD-5.0.2 to 2.11BSD:


There is a prebuilt binary and formatted manpage in release v0.0.1   I've been using it as my login shell for a few months now, although I haven't really stressed it, so (as the version number implies) it's probably best to consider it as alpha quality.

I started with the NetBSD-5.0.2 version because it was closer in age to 2.11BSD, reducing the backport effort. One notable backporting issue was the use of pointers to static functions, which are an issue with overlays. For each non-static function there is a thunk in the common base area that handles the overlay switch. Pointers to these functions actually point to the thunk, so they work as expected. However, for static functions there is no thunk - so function pointers have unpredictable behavior when the called function is in a different overlay than the caller. The workaround is to declare any function invoked via a pointer as non-static. It's likely that I haven't found all of these yet.

--John

Roman Nissa

unread,
Mar 25, 2026, 5:43:24 AM (10 days ago) Mar 25
to [PiDP-11]

That gave me quite the inspiration.

I already have a working doas-workalike (based on the openbsd doas command) and a colored ls (hey, if i have a colored shell, why not a colored ls...). Both have some bugs left, but i'm working on it. I'll release them as soon they are finished.

ALSO a gunzip is in the works, but it has a bug, that let it bail out on some tar files.

Don't hold your breath, but i hope i will get working versions around easter (when i have time to work on them again)

-- Theseus

Reply all
Reply to author
Forward
0 new messages