From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: Guile 2.0.0 cannot open /dev/urandom Date: Thu, 03 Mar 2011 12:57:54 +0100 Message-ID: References: <201102172258.33666.martin@gkc.org.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1299153547 12787 80.91.229.12 (3 Mar 2011 11:59:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2011 11:59:07 +0000 (UTC) Cc: bug-guile@gnu.org, Mike Gran To: Martin Ward Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Mar 03 12:59:03 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pv7BN-0003DZ-CR for guile-bugs@m.gmane.org; Thu, 03 Mar 2011 12:59:01 +0100 Original-Received: from localhost ([127.0.0.1]:40047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv7BM-0003Hw-Tk for guile-bugs@m.gmane.org; Thu, 03 Mar 2011 06:59:00 -0500 Original-Received: from [140.186.70.92] (port=39627 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv7B9-0003Fs-8s for bug-guile@gnu.org; Thu, 03 Mar 2011 06:58:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pv7B7-0000cC-Mw for bug-guile@gnu.org; Thu, 03 Mar 2011 06:58:47 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:46346 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pv7B7-0000c7-KQ for bug-guile@gnu.org; Thu, 03 Mar 2011 06:58:45 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 59D9D3584; Thu, 3 Mar 2011 07:00:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=rC9TezruwpndB4r5ParfNajdEsc=; b=rzkOLn rujRpFqbVGirJz/Nv2fmDVXtNoxd6wsAhFJc0uFjghH5jlo1huIjTvtYbLwsbAyd SEWrt1TafthxsX9Yhzm1A3accVBgLS+MlgNuiag/rLQAA0BBEo0te+bUdKO0Y6NC EWnsE1RpjjisWk+Odz50Fw+PWErY+qO5Ly7zY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=ZGE09fEYxnwppAuFMlneyiQzD9HcMCca 5S4REsEBpusmMe7QFWL/PMvFzGc7w2hIlgo6qK3E3ntQvkvyyTx6wfwjaTOGLzEU 215hDKQ3/z5xw1xdOwRxfcctsQ3P+QMOb67i6grpQRxo+XMvuK4Rwm4K1+EQixni B++ltDaPPgA= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 363863583; Thu, 3 Mar 2011 07:00:05 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 298783580; Thu, 3 Mar 2011 07:00:01 -0500 (EST) In-Reply-To: (Andy Wingo's message of "Sun, 27 Feb 2011 23:47:33 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: C6E5402C-458D-11E0-B997-AF401E47CF6F-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5265 Archived-At: Hi Martin, On Sun 27 Feb 2011 23:47, Andy Wingo writes: > On Thu 17 Feb 2011 23:58, Martin Ward writes: > >> scheme@(guile-user)> (open-input-file "/dev/urandom") >> ERROR: In procedure open-file: >> ERROR: In procedure fport_end_input: Invalid argument > > It seems that Guile is scanning the first few lines of the file for a > "coding" declaration. This is because it is being opened in textual > mode; if you open with (open-file "/dev/urandom" "rb") you will probably > get what you want. I have fixed the (open-input-file "/dev/urandom") case, by having the coding: scan use the read buffer if possible, to avoid a seek. That should catch all cases of interest. Regards, Andy -- http://wingolog.org/