From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.user Subject: Re: strange mkstemp! behavior Date: Mon, 13 Sep 2004 10:51:18 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040913085118.GA28852@www> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095066773 10063 80.91.229.6 (13 Sep 2004 09:12:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Sep 2004 09:12:53 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 13 11:12:37 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C6mt2-00039F-00 for ; Mon, 13 Sep 2004 11:12:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6myY-00043m-Gp for guile-user@m.gmane.org; Mon, 13 Sep 2004 05:18:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C6myU-00043h-Oi for guile-user@gnu.org; Mon, 13 Sep 2004 05:18:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C6myT-00043H-4Z for guile-user@gnu.org; Mon, 13 Sep 2004 05:18:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6myT-00043A-0r for guile-user@gnu.org; Mon, 13 Sep 2004 05:18:13 -0400 Original-Received: from [217.22.192.104] (helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C6msj-0007i4-QR for guile-user@gnu.org; Mon, 13 Sep 2004 05:12:18 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 92407144D9; Mon, 13 Sep 2004 10:51:18 +0200 (CEST) Original-To: Maarten Grachten Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3449 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3449 On Mon, Sep 13, 2004 at 10:24:27AM +0200, Maarten Grachten wrote: > Hi guile people, > > in 1.6.4, but also in 1.7.1 (didn't try others) there seems to be > something wrong when using mkstemp! several times after another like this: > > (define (look-at-this x) > (let ((name "/tmp/XXXXXX")) > (write-line name) > (mkstemp! name))) I'm not a schemer, but doesn't the above code violate the specs? '(let ((name "/tmp/XXXXXX"))' binds 'name' to an inmutable string (string constants are inmutable). How about: (define (look-at-this x) (let ((name (string-copy "/tmp/XXXXXX"))) (write-line name) (mkstemp! name))) On my system this produces: guile> (version ) "1.6.4" guile> (map look-at-this '(1 2 3)) /tmp/XXXXXX /tmp/XXXXXX /tmp/XXXXXX (# # #) guile> HTH Ralf Mattes _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user