also sprach Marc Lehmann <[EMAIL PROTECTED]> [2008.10.06.2042 +0200]:
> > What are those semantics of SHLVL, please? You sound like there's
> > some sort of standard.
> 
> man bash tells me:
> 
>        SHLVL  Incremented by one each time an instance of bash is started.
> 
> this would be broken. zsh has similar wording.
> 
> dash doesn'T use SHLVL (contrary to reports) here (as expected, actually).

So it's not a standard.

And that's the problem: since urxvtcd is /bin/sh, the value of SHLVL
passed to the subprocess depends on which shell is used, when in
fact the shell itself is only used to start processes which replace
the shell.

More specifically, if I run execute x-terminal-emulator on Debian
from a shell with SHLVL=1, I get a shell with SHLVL=3 if /bin/sh is
provided by bash or zsh, and SHLVL=2 otherwise.

It's exactly this what I was trying to prevent/counteract with my
patch, which is wrong in that in the situation described in the last
paragraph, the SHLVL values would be 2 and 1 respectively, which is
also wrong.

Indeed, starting login shells and setting SHLVL=1 in .zlogin seems
like the most logical way forward. I do wonder if loginShell has any
other consequences for me though...

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
god is dead.
    -- nietzsche
nietzsche is dead.
    -- god
nietzsche is god.
    -- dead
 
spamtraps: [EMAIL PROTECTED]

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to