From owner-cvs-gnu Fri Mar 6 12:13:25 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA18321 for cvs-gnu-outgoing; Fri, 6 Mar 1998 12:13:25 -0800 (PST) (envelope-from owner-cvs-gnu) Received: from gvr.gvr.org (root@gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA18307; Fri, 6 Mar 1998 12:13:17 -0800 (PST) (envelope-from guido@gvr.org) Received: (from guido@localhost) by gvr.gvr.org (8.8.8/8.8.5) id VAA13861; Fri, 6 Mar 1998 21:12:40 +0100 (MET) From: Guido van Rooij Message-Id: <199803062012.VAA13861@gvr.gvr.org> Subject: Re: cvs commit: src/gnu/usr.bin/sort sort.c In-Reply-To: <199803061957.LAA08710@burka.rdy.com> from Dima Ruban at "Mar 6, 98 11:57:41 am" To: dima@best.net Date: Fri, 6 Mar 1998 21:12:40 +0100 (MET) Cc: ache@nagual.pp.ru, guido@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Maybe tempname() should check whether the file exsists, and if it does - > generate a new temp filename? > Fix is rather trivial. No. This will still give you an obvious race. Actually, sort.c should use mkstemp(), but I did want to change as little as possible to the code. -Guido