delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/13/11:31:06

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: Re: bash.exe: warning: could not find /tmp, please create!
Date: Wed, 13 Dec 2006 16:30:11 +0000 (UTC)
Lines: 26
Message-ID: <loom.20061213T171131-962@post.gmane.org>
References: <45800D44 DOT 8010204 AT byu DOT net> <006c01c71ec9$bd3b2c20$be32000a AT idirect DOT net>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Kenneth Nellis <knellis <at> syntek-usa.com> writes:

> 
> I'm curious if Eric intends to reference /tmp directly, as opposed to
> recognizing environment variable TMPDIR, if defined?

Indeed, it appears that there may be an upstream bash bug - 'man bash' claims 
that $TMPDIR is honored, but in reality, it is only honored in the fc builtin 
(here-docs do not use it; and if cygwin did not support /proc/self/fd, the 
fallback of named pipes does not use it either; there were no other instances 
of tmp files created by bash).  Yes, I intend for that to be part of my fix.

If the use of TMPDIR by here-docs is not fixed, bash prefers P_tmpdir (which on 
cygwin is defined as "/tmp"), then "/tmp", then "/var/tmp", then "/usr/tmp", 
then "."; if it gets all the way through the list and has not found an 
existing, writable directory, that is when it fails.  But since that failure 
point is rather late in the game, I can see why the previous cygwin-specific 
hack of checking for the existence of "/tmp" as part of bash initialization was 
done.

Oh, and I just found a bash bug - if you make TMPDIR longer than PATH_MAX, the 
heap gets corrupted.

-- 
Eric Blake



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019