projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69d62e1
)
Enable environment variable TMPDIR to set the log temporary directory.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 13 Sep 2010 15:49:11 +0000
(15:49 +0000)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 13 Sep 2010 15:49:11 +0000
(15:49 +0000)
doc/sst.xml
patch
|
blob
|
history
src/sst.py
patch
|
blob
|
history
diff --git
a/doc/sst.xml
b/doc/sst.xml
index fa2074fc63ad3149f8490c6358f9985a10368aa6..bd7259b94545f1f2b0a3bfedf79cddf9b2b021b0 100644
(file)
--- a/
doc/sst.xml
+++ b/
doc/sst.xml
@@
-66,19
+66,20
@@
mode (all features enabled).</para>
<refsect1 id='files'><title>FILES</title>
<variablelist>
<varlistentry>
<refsect1 id='files'><title>FILES</title>
<variablelist>
<varlistentry>
-<term>
/usr/share/doc/sst/sst.doc
</term>
+<term>
<filename>/usr/share/doc/sst/sst.doc</filename>
</term>
<listitem>
<para>Documentation file.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Documentation file.</para>
</listitem>
</varlistentry>
<varlistentry>
-<term>
/usr/tmp/sst-input.log
</term>
+<term>
<filename>$TMPDIR/sst-input.log</filename>
</term>
<listitem>
<listitem>
-<para>Where user input is saved to (send this with your bug reports).</para>
+<para>Where user input is saved to (send this with your bug reports).
+If TMPDIR is not set is defaults to <filename>/tmp</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
-<term>
emsave.trk
</term>
+<term>
<filename>emsave.trk</filename>
</term>
<listitem>
<para>Save file produced by EMEXIT command.</para>
</listitem>
<listitem>
<para>Save file produced by EMEXIT command.</para>
</listitem>
diff --git
a/src/sst.py
b/src/sst.py
index 00f6df3dfa65ec08b449a6fa8c933283ebca08ca..9eaf77dc990a98fab700f7eb927dc613f1298a3c 100644
(file)
--- a/
src/sst.py
+++ b/
src/sst.py
@@
-6197,8
+6197,12
@@
if __name__ == '__main__':
sys.stderr.write("usage: sst [-t] [-x] [startcommand...].\n")
raise SystemExit, 1
# where to save the input in case of bugs
sys.stderr.write("usage: sst [-t] [-x] [startcommand...].\n")
raise SystemExit, 1
# where to save the input in case of bugs
+ if "TMPDIR" in os.environ:
+ tmpdir = os.environ['TMPDIR']
+ else:
+ tmpdir = "/tmp"
try:
try:
- logfp = open(
"/tmp/sst-input.log"
, "w")
+ logfp = open(
os.path.join(tmpdir, "sst-input.log")
, "w")
except IOError:
sys.stderr.write("sst: warning, can't open logfile\n")
sys.exit(1)
except IOError:
sys.stderr.write("sst: warning, can't open logfile\n")
sys.exit(1)