prefer Unix standard-conformant $TMPDIR over hard-wired /tmp;
authorwenzelm
Thu Oct 09 11:15:03 2014 +0200 (2014-10-09 ago)
changeset 586391df53737c59b
parent 58638 5855b9b3d6a3
child 58640 37f852399a32
prefer Unix standard-conformant $TMPDIR over hard-wired /tmp;
etc/settings
lib/Tools/browser
lib/scripts/timestart.bash
src/Doc/System/Basics.thy
src/Pure/System/system_channel.scala
     1.1 --- a/etc/settings	Thu Oct 09 11:00:15 2014 +0200
     1.2 +++ b/etc/settings	Thu Oct 09 11:15:03 2014 +0200
     1.3 @@ -65,7 +65,7 @@
     1.4  ISABELLE_TOOLS="$ISABELLE_HOME/lib/Tools"
     1.5  
     1.6  # Location for temporary files (should be on a local file system).
     1.7 -ISABELLE_TMP_PREFIX="/tmp/isabelle-$USER"
     1.8 +ISABELLE_TMP_PREFIX="${TMPDIR:-/tmp}/isabelle-$USER"
     1.9  
    1.10  # Heap input locations. ML system identifier is included in lookup.
    1.11  ISABELLE_PATH="$ISABELLE_HOME_USER/heaps:$ISABELLE_HOME/heaps"
     2.1 --- a/lib/Tools/browser	Thu Oct 09 11:00:15 2014 +0200
     2.2 +++ b/lib/Tools/browser	Thu Oct 09 11:15:03 2014 +0200
     2.3 @@ -70,7 +70,7 @@
     2.4  classpath "$ISABELLE_HOME/lib/browser/GraphBrowser.jar"
     2.5  
     2.6  if [ -n "$GRAPHFILE" ]; then
     2.7 -  PRIVATE_FILE="${ISABELLE_TMP:-/tmp}/$$"$(basename "$GRAPHFILE")
     2.8 +  PRIVATE_FILE="${ISABELLE_TMP:-${TMPDIR:-/tmp}}/$$"$(basename "$GRAPHFILE")
     2.9    if [ -n "$CLEAN" ]; then
    2.10      mv -f "$GRAPHFILE" "$PRIVATE_FILE" || fail "Cannot move file: $GRAPHFILE"
    2.11    else
     3.1 --- a/lib/scripts/timestart.bash	Thu Oct 09 11:00:15 2014 +0200
     3.2 +++ b/lib/scripts/timestart.bash	Thu Oct 09 11:15:03 2014 +0200
     3.3 @@ -8,7 +8,7 @@
     3.4  TIMES_RESULT=""
     3.5  
     3.6  function get_times () {
     3.7 -  local TMP="/tmp/get_times$$"
     3.8 +  local TMP="${TMPDIR:-/tmp}/get_times$$"
     3.9    times > "$TMP"   # No pipe here!
    3.10    TIMES_RESULT="$SECONDS $(echo $(cat "$TMP") | perl -pe 's,\d+m\d+\.\d+s \d+m\d+\.\d+s (\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')"
    3.11    rm -f "$TMP"
     4.1 --- a/src/Doc/System/Basics.thy	Thu Oct 09 11:00:15 2014 +0200
     4.2 +++ b/src/Doc/System/Basics.thy	Thu Oct 09 11:15:03 2014 +0200
     4.3 @@ -272,8 +272,7 @@
     4.4    
     4.5    \item[@{setting_def ISABELLE_TMP_PREFIX}@{text "\<^sup>*"}] is the
     4.6    prefix from which any running @{executable "isabelle_process"}
     4.7 -  derives an individual directory for temporary files.  The default is
     4.8 -  somewhere in @{file_unchecked "/tmp"}.
     4.9 +  derives an individual directory for temporary files.
    4.10    
    4.11    \end{description}
    4.12  \<close>
     5.1 --- a/src/Pure/System/system_channel.scala	Thu Oct 09 11:00:15 2014 +0200
     5.2 +++ b/src/Pure/System/system_channel.scala	Thu Oct 09 11:15:03 2014 +0200
     5.3 @@ -43,7 +43,7 @@
     5.4    {
     5.5      val i = Fifo_Channel.next_fifo()
     5.6      val script =
     5.7 -      "FIFO=\"/tmp/isabelle-fifo-${PPID}-$$" + i + "\"\n" +
     5.8 +      "FIFO=\"${TMPDIR:-/tmp}/isabelle-fifo-${PPID}-$$" + i + "\"\n" +
     5.9        "echo -n \"$FIFO\"\n" +
    5.10        "mkfifo -m 600 \"$FIFO\"\n"
    5.11      val result = Isabelle_System.bash(script)