Environment variable issue

Jim Diamond Jim.Diamond at acadiau.ca
Sat Aug 31 04:05:58 CEST 2013


On Mon, Aug 12, 2013 at 13:46 (+0300), Adrian Sendroiu wrote:

> Hello,

> I noticed a strange behaviour when urxvt is started in an environment
> which contains an empty string.

> char *argv[] = { "urxvt", NULL };
> char *envp[] = { "a=bbbbbbb", "", "c=dddddddddd", "e=fffffffffffff", NULL };

> execve("/usr/local/bin/urxvt", argv, envp);

> $ env
> =c
> a=bbbbbbb
> COLORTERM=rxvt-xpm
> WINDOWID=46137365
> COLORFGBG=11;default;15
> TERM=rxvt-unicode
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> DISPLAY=:0
> dddddddddd=e
> fffffffffffff=
> PWD=/tmp

> As you can see, some variables get corrupted.

I tried your code (extended to a complete program) and I don't see the
problems you see.  I get the expected environment (the empty string is
missing, the rest is there).

Which version of urxvt are you using?  I am using 9.18 (slightly
modified in ways that don't come anywhere near the environment).

Cheers.

				Jim




More information about the rxvt-unicode mailing list