if ksh invoked as sh, don't seed with /dev/urandom

(because even a 4-byte read slows configure/make down a lot)
This commit is contained in:
tg 2004-04-26 18:28:07 +00:00
parent 5860828e51
commit b77a4be013
1 changed files with 2 additions and 2 deletions

4
main.c
View File

@ -1,4 +1,4 @@
/* $MirBSD: main.c,v 1.3 2004/04/26 18:24:39 tg Exp $ */
/* $MirBSD: main.c,v 1.4 2004/04/26 18:28:07 tg Exp $ */
/* $OpenBSD: main.c,v 1.26 2004/01/08 05:43:14 jmc Exp $ */
/*
@ -259,7 +259,7 @@ main(int argc, char *argv[])
setint(global("PPID"), (long) ppid);
#ifdef KSH
trnd = *((long *)kshname);
if ((tfil = fopen("/dev/urandom", "rb")) != NULL) {
if (Flag(FSH) != 1) if ((tfil = fopen("/dev/urandom", "rb")) != NULL) {
fread(&trnd, 4, 1, tfil);
fclose(tfil);
}