tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Testing mksh as bootstrap shell



    Date:        Wed, 24 Jun 2020 15:07:46 +0100
    From:        Jonathan Perkin <jperkin%joyent.com@localhost>
    Message-ID:  <20200624140746.GT4999%joyent.com@localhost>

  |   /opt/pkg/bin/mksh: ulimit: -m: unknown option

You're likely to find ulimit incompatibilities in any shell that
you pick, there is just one standard option (-f, which is the one
that almost no-one ever actually wants) - beyond that almost every
shell has invented its own naming convention for the rest of the
functionality (they all give access to everything that matters - just
differently).   There are a few fairly common options (which mean
the same in most shells) and more which are just different everywhere.
Unfortunately all this makes standardising anything more than -f
almost impossible.

Fortunately, of the standard builtin commands, ulimit is the only
one that suffers from this problem, so it should be possible to
work around (provide vars which specify which option to use for
each desired ulimit function and have the shell selection decide
upon their values -- just note that for a couple of the options, the
units in which the values are set are also not the same everywhere,
so it might be better to provide a function which can deal with it.)

Beyond that, always use cd -P, and stick to the basics with the
other commands, and all modern posix like shells should handle things.

kre



Home | Main Index | Thread Index | Old Index