From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jos=E9_Roberto_B=2E_de_A=2E?= Monteiro Newsgroups: gmane.lisp.guile.user Subject: mkstemp strange behavior Date: Wed, 10 Aug 2005 14:25:26 -0300 Message-ID: <20050810172526.GA7101@igbt.sel.eesc.usp.br> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123695158 16330 80.91.229.2 (10 Aug 2005 17:32:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2005 17:32:38 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Aug 10 19:32:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2uQO-0002AZ-GL for guile-user@m.gmane.org; Wed, 10 Aug 2005 19:31:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2uTW-0000I0-3g for guile-user@m.gmane.org; Wed, 10 Aug 2005 13:34:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2uSG-0008Kc-9w for guile-user@gnu.org; Wed, 10 Aug 2005 13:33:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2uS9-0008Gc-Tb for guile-user@gnu.org; Wed, 10 Aug 2005 13:33:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2uS8-0008Dk-JS for guile-user@gnu.org; Wed, 10 Aug 2005 13:33:20 -0400 Original-Received: from [143.107.235.233] (helo=igbt.sel.eesc.usp.br) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2uYs-0001Jk-D7 for guile-user@gnu.org; Wed, 10 Aug 2005 13:40:19 -0400 Original-Received: from ariel.sel.eesc.usp.br ([143.107.235.183] ident=mail) by igbt.sel.eesc.usp.br with esmtp (Exim 3.36 #1 (Debian)) id 1E2uKY-0002Yc-00 for ; Wed, 10 Aug 2005 14:25:30 -0300 Original-Received: from betoes by ariel.sel.eesc.usp.br with local (Exim 3.36 #1 (Debian)) id 1E2uKU-0001so-00 for ; Wed, 10 Aug 2005 14:25:26 -0300 Original-To: guile-user@gnu.org Content-Disposition: inline User-Agent: Mutt/1.5.9i 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: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:4680 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4680 Hello all! I was trying to use mkstemp! in my program, instead of tmpnam, but I have no success... I mkstemp! is getting me confused. It alters original string, so we can easely have the name of temporary file. But, with following code, I suposed it would work, but it is reusing an old string: #!/usr/bin/guile \ -s !# (define (test) (let ((filename "/tmp/XXXXXX") (tmp #f)) (format #t "before: filename=~A\n" filename) (set! tmp (mkstemp! filename)) (format #t "after : filename=~A\n" filename) (close tmp))) (format #t "First call...\n") (test) (format #t "Second call...\n") (test) And the result of this code is: First call... before: filename=/tmp/XXXXXX after : filename=/tmp/HGLPtZ Second call... before: filename=/tmp/HGLPtZ ERROR: In procedure mkstemp!: ERROR: Invalid argument I can not figure out why the string is not set to /tmp/XXXXXX in the second call... Some help!? Regards Betoes _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user