From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261642AbVAGVnX (ORCPT ); Fri, 7 Jan 2005 16:43:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261640AbVAGVlj (ORCPT ); Fri, 7 Jan 2005 16:41:39 -0500 Received: from pastinakel.tue.nl ([131.155.2.7]:6417 "EHLO pastinakel.tue.nl") by vger.kernel.org with ESMTP id S261634AbVAGVjp (ORCPT ); Fri, 7 Jan 2005 16:39:45 -0500 Date: Fri, 7 Jan 2005 22:39:43 +0100 From: Andries Brouwer To: Ron Peterson Cc: linux-kernel@vger.kernel.org Subject: Re: /dev/random vs. /dev/urandom Message-ID: <20050107213943.GA6052@pclin040.win.tue.nl> References: <20050107190536.GA14205@mtholyoke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050107190536.GA14205@mtholyoke.edu> User-Agent: Mutt/1.4.2i X-Spam-DCC: : Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 07, 2005 at 02:05:36PM -0500, Ron Peterson wrote: > When I compile and run the code below, the string of octal characters > generated by reading /dev/random contains long strings of zeroes. But it is your program that invents the zeros, they are not returned by /dev/random. The bug in your program is failing to check the return value of read().