From owner-freebsd-hackers Mon Oct 16 22:56:01 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA10309 for hackers-outgoing; Mon, 16 Oct 1995 22:56:01 -0700 Received: from grunt.grondar.za (grunt.grondar.za [196.7.18.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id WAA10303 for ; Mon, 16 Oct 1995 22:55:51 -0700 Received: from grumble.grondar.za (grumble.grondar.za [196.7.18.130]) by grunt.grondar.za (8.6.12/8.6.9) with ESMTP id HAA24602; Tue, 17 Oct 1995 07:55:34 +0200 Received: from localhost (localhost [127.0.0.1]) by grumble.grondar.za (8.6.12/8.6.9) with SMTP id HAA29644; Tue, 17 Oct 1995 07:55:33 +0200 Message-Id: <199510170555.HAA29644@grumble.grondar.za> X-Authentication-Warning: grumble.grondar.za: Host localhost didn't use HELO protocol To: Bruce Evans cc: hackers@FreeBSD.org Subject: Re: Creating a /dev/random Date: Tue, 17 Oct 1995 07:55:33 +0200 From: Mark Murray Sender: owner-hackers@FreeBSD.org Precedence: bulk > >> 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 Either you are missing something here or I am :-) If ONE process is reading BOTH /dev/random and /dev/zero (making buf common?) is there a problem? > >> is inelegant anyway. Perhaps there should be a zeroout() function to > >> optimize this important (;-) device. > > >...or only c bytes should be zero'ed out? > > Good idea. Will do! -- Mark Murray 46 Harvey Rd, Claremont, Cape Town 7700, South Africa +27 21 61-3768 GMT+0200 Finger mark@grumble.grondar.za for PGP key