Hi Torsten! On Di, 23 Feb 2010, Torsten Förtsch wrote:
Übrigens lügt die Shell bzgl. ihres Pids in Subshells:
$ ( x=fritz; echo $$; ); echo $$ 4109 4109
Das ist dokumentiert. ,---- | $ Expands to the process ID of the shell. In a () subshell, it | expands to the process ID of the current shell, not the sub- | shell. `---- Darüberhinaus gibt es mit in Version 4 der Bash die Variable $BASHPID, die Dir die PID anzeigt: ,---- | BASHPID | Expands to the process id of the current bash process. This | differs from $$ under certain circumstances, such as subshells | that do not require bash to be re-initialized. `---- #v+ chrisbra@t41:~$ echo $$ $BASHPID $( echo $$ $BASHPID ) 29721 29721 29721 29767 chrisbra@t41:~$ echo $BASH_VERSION 4.0.33(1)-release #v- Mit freundlichen Grüßen Christian -- Als der Humor den Karneval sah, zweifelte er an sich. -- Norbert Stoffel -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org