Lorenzo Beretta dixit:

>The $RANDOM variable should not be exported: it's useless, and it may
>fool scripts that try to detect if the shell provides it.

This is an upstream decision, please continue this either on
the mailing list (Cc’d) or (if you really must) the Launchpad
tracker.

Actually, this is not useless: it’s imported into subshells,
and mksh reads the environment at startup and lets it contribute
to entropy there. The absence of proper arc4random() in most
operating systems is really a PITA.

We might throw it away (and just use arc4random() if there,
and… whatever… if not), for the sake of simplicity. But then,
lesser platforms (such as GNU/Linux) would have worse entropy
in $RANDOM values.

That being said, there is a Pure mksh™ implementation of
arc4random() around… only downside is, it reads a lot of
bytes from /dev/urandom, which kills Linux’ inferiour kernel
RNG as well…

I wish we had access to AT_RANDOM, but glibc uses all of
it for its own purposes instead of setting up an SRNG¹…

Anyway, I do not discuss upstream things like this in the
Debian bugtracker, as this is most definitely not a bug
in the package.

bye,
//mirabilos

① stretching RNG
-- 
„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.”)

Reply via email to