From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.lisp.guile.user Subject: Re: request tmpfile(3) wrapping in Guile 1.9 libguile Date: Mon, 8 Feb 2010 23:36:07 -0500 Message-ID: <65CB9309-3B69-487A-827C-AF306F495E15@raeburn.org> References: <877hqoubkv.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1265690195 14458 80.91.229.12 (9 Feb 2010 04:36:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2010 04:36:35 +0000 (UTC) Cc: guile-user@gnu.org, Thien-Thi Nguyen To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Feb 09 05:36:32 2010 Return-path: Envelope-to: guile-user@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 1Nehpw-0004Rg-Br for guile-user@m.gmane.org; Tue, 09 Feb 2010 05:36:32 +0100 Original-Received: from localhost ([127.0.0.1]:42110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nehpv-00086g-LL for guile-user@m.gmane.org; Mon, 08 Feb 2010 23:36:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nehpr-00086T-MI for guile-user@gnu.org; Mon, 08 Feb 2010 23:36:27 -0500 Original-Received: from [199.232.76.173] (port=48113 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nehpr-00086L-7I for guile-user@gnu.org; Mon, 08 Feb 2010 23:36:27 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nehpi-0004hq-2R for guile-user@gnu.org; Mon, 08 Feb 2010 23:36:27 -0500 Original-Received: from splat.raeburn.org ([69.25.196.39]:36444 helo=raeburn.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NehpZ-0004fX-Tq for guile-user@gnu.org; Mon, 08 Feb 2010 23:36:17 -0500 Original-Received: from squish.raeburn.org (squish.raeburn.org [10.0.0.172]) by raeburn.org (8.14.3/8.14.1) with ESMTP id o194a8xr005083; Mon, 8 Feb 2010 23:36:08 -0500 (EST) In-Reply-To: X-Mailer: Apple Mail (2.1077) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:7628 Archived-At: On Feb 8, 2010, at 12:06, Andy Wingo wrote: >> But mkstemp doesn't guarantee that no one else will grab the file = name >> in between the time mkstemp checks that the file doesn't exist, and = when >> you actually open(O_CREAT) it. >=20 > It does. The return value from mkstemp! is a port, and it mutates the > template to give you a file name. See mkstemp(3). Ah, yes, I was looking at mktemp(3)... *sigh* Too many similarly-named = functions. It looks to me like tmpfile still has the advantage that (at least on a = POSIX system with local file systems) the file will automatically go = away even in the event of ungraceful process termination. You could = call unlink from Scheme code, but then you're coding the Scheme = application to be dependent on POSIX behavior, versus letting the = Windows version of tmpfile help you out. Ken=