X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake 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: References: <45800D44 DOT 8010204 AT byu DOT net> <006c01c71ec9$bd3b2c20$be32000a AT idirect DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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/