Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-12-02 12:36:54 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-12-02 12:36:54 +0300
commit725d792fe18ac0cb5ff4a19ee93202264335b1de (patch)
tree5cfb1aae224091ef9b8baa9d2573514da5472e58
parentb4a3a3e367d36abf78ad1d6c5954714d64f21ee3 (diff)
* setup2.sgml (setup-env): Clarify that Windows environment gets
copied over. Add paragraph about TMP, TEMP, and TMPDIR.
-rw-r--r--winsup/doc/ChangeLog5
-rw-r--r--winsup/doc/setup2.sgml32
2 files changed, 36 insertions, 1 deletions
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 65786f774..a9a80afe2 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-02 Ken Brown <kbrown@cornell.edu>
+
+ * setup2.sgml (setup-env): Clarify that Windows environment gets
+ copied over. Add paragraph about TMP, TEMP, and TMPDIR.
+
2009-11-18 Corinna Vinschen <corinna@vinschen.de>
* overview2.sgml (ov-hi-files): Remove reference to root directory when
diff --git a/winsup/doc/setup2.sgml b/winsup/doc/setup2.sgml
index 99558f44f..51fc0d3c2 100644
--- a/winsup/doc/setup2.sgml
+++ b/winsup/doc/setup2.sgml
@@ -4,7 +4,9 @@
You may wish to specify settings of several important environment
variables that affect Cygwin's operation. Some of these settings need
to be in effect prior to launching the initial Cygwin session (before
-starting your bash shell, for instance), and are, consequentially, best
+starting your bash shell, for instance). They should therefore be set
+in the Windows environment; all Windows environment variables are
+imported when Cygwin starts. Such settings can be
placed in a .bat file. An initial file is named Cygwin.bat and is created
in the Cygwin root directory that you specified during setup. Note that
the "Cygwin" option of the Start Menu points to Cygwin.bat. Edit
@@ -66,6 +68,34 @@ first starts. Most Cygwin applications do not make use of the
<function>dlopen ()</function> call and do not need this variable.
</para>
+<para>
+In addition to <envar>PATH</envar>, <envar>HOME</envar>,
+and <envar>LD_LIBRARY_PATH</envar>, there are three other environment
+variables which, if they exist in the Windows environment, are
+converted to UNIX format: <envar>TMPDIR</envar>, <envar>TMP</envar>,
+and <envar>TEMP</envar>. The first is not set by default in the
+Windows environment but the other two are, and they point to the
+default Windows temporary directory. If set, these variables will be
+used by some Cygwin applications, possibly with unexpected results.
+You may therefore want to unset them by adding the following two lines
+to your <filename>~/.bashrc</filename> file:
+
+<screen>
+unset TMP
+unset TEMP
+</screen>
+
+This is done in the default <filename>~/.bashrc</filename> file.
+Alternatively, you could set <envar>TMP</envar>
+and <envar>TEMP</envar> to point to <filename>/tmp</filename> or to
+any other temporary directory of your choice. For example:
+
+<screen>
+export TMP=/tmp
+export TEMP=/tmp
+</screen>
+</para>
+
</sect1>
<sect1 id="setup-maxmem"><title>Changing Cygwin's Maximum Memory</title>