emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: find-grep makes raw terminal ANSI]


From: Eli Zaretskii
Subject: Re: address@hidden: Re: find-grep makes raw terminal ANSI]
Date: Sun, 18 Nov 2007 06:14:35 +0200

> From: David Kastrup <address@hidden>
> Cc: "Drew Adams" <address@hidden>,  address@hidden
> Date: Sun, 18 Nov 2007 01:29:03 +0100
> 
> > setenv doesn't change user's environment, it changes the environment
> > passed to inferior processes.
> 
> My first reaction to this was "Huh?".

You misunderstood what Drew was asking, and thus my response.  He was
asking about the environment used by Emacs itself.  In general,
`setenv' changes the environment of the program that calls it, but in
the case in point it isn't so.

> In UNIX, where the environment
> concept originated, it is _exclusively_ something which is passed to
> inferior processes, quite like command line arguments.
> 
> It is only when coming from an MSDOS background (which tended to
> implement UNIX concepts badly or incompletely, and so had something like
> a global environment, and pipes implemented with intermediate files of
> arbitrary size and other things close, but not identical to the real
> thing) that something like a global "user's environment" concept does
> even exist.

This rethoric is misplaced: there's no difference between Unix and
MS-DOS in this regard: both have separate environment for each
process, and on both systems a program can only legitimately change
its own environment, which is then copied to the children processes.
It cannot change the environment of the parent process (except by
writing to its memory, which I don't consider a legitimate behavior).
Unlike what you seem to think, there's no "global" environment on
MS-DOS.




reply via email to

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