From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 26 10:03:47 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8AD8106566B; Fri, 26 Feb 2010 10:03:47 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f199.google.com (mail-pz0-f199.google.com [209.85.222.199]) by mx1.freebsd.org (Postfix) with ESMTP id 76BA78FC1E; Fri, 26 Feb 2010 10:03:47 +0000 (UTC) Received: by pzk37 with SMTP id 37so2180325pzk.7 for ; Fri, 26 Feb 2010 02:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=O0xWOGfRpIsGooQt7o5qOEdu31FE2yK+xgvsr9RsYNI=; b=hsnVE4uLvBv4M1PSUnm+5bI2gEL4Rt2TzeiM6YQcfO12eJIfg6oBrgdxQ+j0bz92IY 5UOyr8++4DSPgfeXro3dmxW2424u3l/R22zrfV9EfUDQ+UWFn1m3UwgxhtrS1/99PHzU rrENdcs6QmL8L29u58T10YTu+s7xKlfX1gRAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=pY+wJn9mEhU9Zj6QB6KkbUDg6XeY3Za5UDP33muqDg0le1NpxcBuOxQHi1bCzsPAar 7zHYz9uNQ3HSohw928Q1mbX2gvTZlm43D3NJqOEQs2+5upGlSSf7hb6pGBfmkJrqJB/a 5vN/mf5eOqRXlddkoc3ucUX7gEcWrPlY7u4kQ= MIME-Version: 1.0 Received: by 10.142.151.15 with SMTP id y15mr67747wfd.310.1267178622561; Fri, 26 Feb 2010 02:03:42 -0800 (PST) In-Reply-To: <20100226092119.GA61498@owl.midgard.homeip.net> References: <7d6fde3d1002251850m3d32904emece0182e905b84c5@mail.gmail.com> <7d6fde3d1002252100oc64434ci5f6783ff10a9f0ea@mail.gmail.com> <20100226092119.GA61498@owl.midgard.homeip.net> Date: Fri, 26 Feb 2010 02:03:42 -0800 Message-ID: <7d6fde3d1002260203l5c7491c7w9ed84cdf40acf9d7@mail.gmail.com> From: Garrett Cooper To: Erik Trulsson Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-Hackers , Doug Barton Subject: Re: mktemp(1) in /tmp or $PWD? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2010 10:03:47 -0000 On Fri, Feb 26, 2010 at 1:21 AM, Erik Trulsson wrote: > On Thu, Feb 25, 2010 at 10:27:40PM -0800, Doug Barton wrote: >> On Thu, 25 Feb 2010, Garrett Cooper wrote: >> >> > So what I did was I wrote up a patch to be *I know... here it comes* >> > more like GNU coreutils' copy of mktemp. >> >> What's the motivation for this? I'm a little confused about why we'd >> want to change this when the -t option already exists. Also, does POSIX >> say anything about what the default should be? > > POSIX does not define the mktemp(1) utility as far as I can tell, and > thus says nothing about the default. > > The HISTORY section in the manpage says that mktemp(1) originated with > OpenBSD so if anything it is the OpenBSD implementation that ought to > be used as a reference. > > If the GNU implementation behaves differently, then I would say it is > likely the GNU version which is wrong. I'm not going to get into that bikeshed topic. I'm not arguing about what's right or wrong -- I just prefer not dealing with quirks between different systems, like having to type `find .' instead of just `find', which searches $PWD first with coreutil's find, or having to type the entry in fstab exactly when doing a mount or unmount because the directory isn't properly abspath'ed. FreeBSD is a great system; if there are ways that I can possibly make it better by adding smart defaults I will propose them wherever I possibly can, because if I've thought of something, I'm pretty sure I'm not the first one to have thought of it. Thanks, -Garrett