From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 26 02:50:52 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 988B6106566C for ; Fri, 26 Feb 2010 02:50:52 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7380D8FC1C for ; Fri, 26 Feb 2010 02:50:52 +0000 (UTC) Received: by pvg3 with SMTP id 3so1604610pvg.13 for ; Thu, 25 Feb 2010 18:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=iCXqZlfyB5ueDwxCCT6mSwdqUA2Ji3u2W05de1p0bvY=; b=JQH9Dvx/9+ykJgmeHvIYf7BYfk6vLX0A8Wy/oZryDfYSfkktFqbQdGOBYEnCMVNB/J p13p2XE+YaF/7mg+92dAoA/a+2VsQ7vu7kQvuGB0ZGrCsPgfs8RBgQS7SXov+aPppqjc IysInhJk81myatQzv5rqa+PK44e6nJiRWUsv8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=G6wbCPLxla9bfvmtzVIwsj/FKseHqDL6Mi7ypmC0CLKxxOMUe8im05Ju0bwz15yrZM mqfjaEEnnvx7vM1Pb4e3OmSIAPFyuilf0Vn0TIwW8vQN2uy+I8i/uNQq8MgZhp6ugbqD VwPWC+t9esECQSQqyk7UkwOXcJOa9J6GQr7aA= MIME-Version: 1.0 Received: by 10.142.61.23 with SMTP id j23mr353891wfa.77.1267152646968; Thu, 25 Feb 2010 18:50:46 -0800 (PST) Date: Thu, 25 Feb 2010 18:50:46 -0800 Message-ID: <7d6fde3d1002251850m3d32904emece0182e905b84c5@mail.gmail.com> From: Garrett Cooper To: FreeBSD-Hackers Content-Type: text/plain; charset=ISO-8859-1 Subject: 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 02:50:52 -0000 Hi Hackers, Really basic question (because I'm relatively new to the Unix scene -- only been using it for the last 10 years, so I don't know if this was done for backwards compatibility with SysV) -- is mktemp(1) without -t supposed to default to $PWD instead of /tmp if a template is specified, e.g. [root@left4dead /usr/home/garrcoop]# mktemp fooXXXXXX foovE3FLt [root@left4dead /usr/home/garrcoop]# ls foovE3FLt foovE3FLt I ask because GNU coreutils' copy of mktemp (I know... I know...) defaults to /tmp if $TMPDIR isn't specified. Thanks! -Garrett