This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash.exe: warning: could not find /tmp, please create!


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]