summaryrefslogtreecommitdiffstats
path: root/bin/ksh/var.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/var.c')
-rw-r--r--bin/ksh/var.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/ksh/var.c b/bin/ksh/var.c
index 5f6ec98832a..c985a1144e8 100644
--- a/bin/ksh/var.c
+++ b/bin/ksh/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.7 1998/06/25 19:02:27 millert Exp $ */
+/* $OpenBSD: var.c,v 1.8 1999/01/08 20:25:02 millert Exp $ */
#include "sh.h"
#include "ksh_time.h"
@@ -844,6 +844,17 @@ makenv()
}
/*
+ * Called after a fork in parent to bump the random number generator.
+ * Done to ensure children will not get the same random number sequence
+ * if the parent doesn't use $RANDOM.
+ */
+void
+change_random()
+{
+ rand();
+}
+
+/*
* handle special variables with side effects - PATH, SECONDS.
*/