[Top][All Lists]

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

Re: Post-22.1 development?

From: Stefan Monnier
Subject: Re: Post-22.1 development?
Date: Wed, 13 Jun 2007 13:39:04 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>     Actually, the value of TERM is only for internal use and should never be
>     passed on to subprocesses, so its presence in process-environment is
>     not important.

> That is true, in a sense.  However, at present the primitives to create
> subprocesses just pass TERM along to the subprocess.  Thus, it is up to
> the Lisp code to set it.

Yes and it's a bug (which occasionally causes things like subprocesses
returning to Emacs ASCII escape sequences where they're not expected).
This bug was temporarily "fixed" (by yours truly) some time in the past on
the CVS trunk by removing TERM from process-environment at startup (or
rather setting it to a safe default such as "TERM=dumb").  This is
fundamentally the right thing to do, although the way I did this was wrong
(which is why it was later reverted).

The right way to do it is to remove it from process-environment
(i.e. remove it from the environment passed to subprocesses) but store it
elsewhere.  I think in general, we should be careful to distinguish the
environment inherited from our parent process (which is currently available
only through process-environment but should be stored elsewhere so as to be
available even after modifying process-environment) from the environment
that will be passed to subprocesses (which is obviously
process-environment, as the name clearly implies).

> Should this work differently?  Should we do something in call-process
> and start-process to set TERM?

It should be done directly at startup.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]