From owner-freebsd-hackers Mon Oct 16 18:27:39 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id SAA02631 for hackers-outgoing; Mon, 16 Oct 1995 18:27:39 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id SAA02621 for ; Mon, 16 Oct 1995 18:27:34 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id LAA17511; Tue, 17 Oct 1995 11:23:55 +1000 Date: Tue, 17 Oct 1995 11:23:55 +1000 From: Bruce Evans Message-Id: <199510170123.LAA17511@godzilla.zeta.org.au> To: bde@zeta.org.au, mark@grondar.za Subject: Re: Creating a /dev/random Cc: hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org Precedence: bulk I wrote: >>> To avoid this, use the existing buffer `zbuf', which is freed correctly. >>> There is no need for another variable - local variables are per process. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> Perhaps `zbuf' should be renamed `buf'. >>I don't understand something here - what happens if the one process is >>reading both /dev/zero and /dev/random? will the two not then try to >>share buf/zbuf and screw up? >See above Oops, I misread `one process'. Well, one process can't be in the kernel twice. Bruce