From 5286ae8711099897298d264ae830adabe9dcb998 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 28 Apr 2014 21:40:19 +0100 Subject: ash: reset $RANDOM in subshell --- shell/ash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 0b6be4aff..3dc666fbb 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -14437,6 +14437,8 @@ forkshell_init(const char *idstr) *gmpp = fs->gmp; cmdtable = fs->cmdtable; + CLEAR_RANDOM_T(&random_gen); /* or else $RANDOM repeats in child */ + reinitvar(); fs->fp(fs); -- cgit v1.2.3-55-g6feb