[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: woody: Wo bleibt TMPDIR im xterm?



Andreas Pakulat <apaku@gmx.de> writes:

>On 12.Oct 2004 - 15:19:50, Helmut Waitzmann wrote:

>> Ich habe eine Datei "$HOME"/.profile, in der TMPDIR gesetzt und
>> exportiert wird.  Ich habe keine Datei "$HOME"/.bash_profile.
>> Ich habe außerdem eine Datei "$HOME"/.bashrc, in der TMPDIR nicht
>> verändert wird.
>> 
>> Ein Beispiel:
>> 
>> (1)
>> 
>>    env TMPDIR="$HOME"/tmp xterm +ls -e sh -c 'printenv TMPDIR; read line' sh
>> 
>> öffnet mir ein xterm, in welchem nichts ausgegeben wird.
>
>Also das klappt auf meinem System wunderbar:
>andreas@morpheus:~>env tmpdir=temp xterm +ls -e sh -c 'echo $tmpdir;read line' sh
>ergibt:
>temp
>
>im xterm

DAS tut bei mir auch.  Darum geht mir aber nicht:  Ich bin nicht an der
Umgebungsvariablen tmpdir sondern an der Umgebungsvariablen TMPDIR
interessiert, also nicht

   env tmpdir=temp xterm +ls -e sh -c 'echo $tmpdir;read line' sh

sondern

   env TMPDIR=temp xterm +ls -e sh -c 'printenv TMPDIR;read line' sh

.

>> Laut manual page startet das xterm mit dem Parameter "+ls" ein
>> nicht-interaktives nicht-login-shell:  Demnach wird weder
>> "$HOME"/.bash_profile, noch "$HOME"/.profile, noch "$HOME"/.bashrc, noch
>> "$ENV" eingelesen.
>
>Nicht ganz, bei mir steht es ist eine non-login shell. Nichts von
>nicht-interaktiv. Also wird $HOME/.bashrc eingelesen. 

Hast Du ein anderes bash(1) manual page?  Bei meinem lese ich

   INVOCATION

[...]

       An interactive shell is one started without non-option
       arguments and without the -c option whose standard input and
       output are both con- nected to terminals (as determined by
       isatty(3)), or one started with the -i option.

Ist also eindeutig ein nicht-interaktives shell:  Ich habe das option
"-c" angegeben.

       A login shell is one whose first character of argument zero is
       a -, or one started with the --login option.

Ist also eindeutig ein nicht-login-shell:  arg0 (hier: "sh") beginnt
nicht mit einem "-" und option "--login" steht auch nicht da.

Und weiter im manual:

       If bash is invoked with the name sh, it tries to mimic the
       startup behavior of historical versions of sh as closely as
       possible, while conforming to the POSIX standard as well.

[...]

       A non-interactive shell invoked with the name sh does not
       attempt to read any other startup files.  When invoked as sh,
       bash enters posix mode after the startup files are read.

Welche Startup-Dateien sollten da noch gelesen werden?  Und selbst wenn:
Ich habe keine Startup-Datei, in der

   unset TMPDIR

steht.

>> Trotzdem unterscheiden sich (1) und (2) in der Umgebungsvariablen TMPDIR.
>
>Nicht bei mir.

Bist Du wirklich sicher, beim Test von (1) und (2) TMPDIR und nicht etwa
tmpdir verwendet zu haben?
-- 
Wenn Sie mir E-Mail schreiben, stellen |  When writing me e-mail, please
Sie bitte vor meine E-Mail-Adresse     |  precede my e-mail address with
meinen Vor- und Nachnamen, etwa so:    |  my full name, like
Helmut Waitzmann <xxx@example.net>, (Helmut Waitzmann) xxx@example.net



Reply to: