From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23506 invoked from network); 31 Jan 2002 03:20:59 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 31 Jan 2002 03:20:59 -0000 Received: (qmail 20821 invoked by alias); 31 Jan 2002 03:20:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16519 Received: (qmail 20803 invoked from network); 31 Jan 2002 03:20:46 -0000 Date: Wed, 30 Jan 2002 22:20:41 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Cc: 131337-forwarded@bugs.debian.org Subject: problems with RANDOM in subshells Message-ID: <20020131032041.GA13560@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i One can work around the problem described below by doing : $RANDOM ; (echo $RANDOM) | cat Should the random-seeding behavior be changed for subshells? ----- Forwarded message from Falk Hueffner ----- For each subshell, $RANDOM gets initialized to the same value, which leads to the same sequence of random numbers. This makes e. g. playlist shuffling functions way boring, and is generally not what one would expect. falk@borkum:~% (echo $RANDOM) | cat 12042 falk@borkum:~% (echo $RANDOM) | cat 12042 falk@borkum:~% (echo $RANDOM) | cat 12042 Falk -- System Information Debian Release: 3.0 Architecture: alpha Kernel: Linux borkum 2.4.16 #1 Sat Dec 1 23:02:59 CET 2001 alpha Locale: LANG=C, LC_CTYPE=de_DE Versions of packages zsh depends on: ii libc6.1 2.2.4-7 GNU C Library: Shared libraries an ii libcap1 1:1.10-12 support for getting/setting POSIX. ii libncurses5 5.2.20020112a-2 Shared libraries for terminal hand ----- End forwarded message -----