GNU bug report logs -
#2259
23.0.90; PATCH: getenv mistakenly passes a frame to getenv_internal, when it should instead pass a CONS
Previous Next
Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Date: Tue, 10 Feb 2009 03:45:02 UTC
Severity: normal
Tags: patch
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #12 received at 2259-done <at> emacsbugs.donarmstrong.com (full text, mbox):
On Tue, Feb 10, 2009 at 04:37, Eric Hanchrow <eric.hanchrow <at> gmail.com> wrote:
> I poked around and
> saw that getenv was passing a frame to getenv_internal, but
> getenv_internal only consults that second argument if it's a CONS. This
> patch seems to fix the problem.
I think the patch is right, so I'm committing it. getenv-internal's
docstring used to say that it searches in the frame environment, but
it wasn't right and was recently fixed. (The few) other uses of
getenv-internal rightly treat ENV as a list of environment variables.
Stefan, I just saw that `server-with-environment' does this:
(let ((,value (getenv-internal ,var ,env)))
(push (if (null ,value)
,var
(concat ,var "=" ,value))
process-environment)))
which will fail if ENV contains a negative entry. Is that a bug, or it
is known at that point that the ENV arg of `server-with-environment'
will never contain negative entries (i.e., can the output of
(process-get process 'env) contain negative entries)? If it is
intended, perhaps a comment would be in order.
Juanma
This bug report was last modified 16 years and 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.