>     IIRC, SysV had putenv(3), while BSD had setenv(3).  The latter had a
> corresponding unsetenv(3), while the former didn't.
> 
> > On my Ubuntu Linux system, the unsetenv(3) man page says that it
> > conforms to 4.3BSD and POSIX.1-2001.
> 
>     POSIX?  As Wietse Venema used to put it, you're young and impatient. ;)

You mean SysV does not have C function for unsetting environment? I guess this 
is why zsh has coded direct environ global manipulations (controlled by 
USE_SET_UNSET_ENV). We can probably borrow code from there. I cannot say though 
in which systems **environ is supported, but both bash and zsh just use only 
the execve function out of exec* functions family: this means that environment 
pointer is always passed directly (though with constructs like `FOO=bar 
frobnicate` and `local -x` it would be strange to see something else: it would 
be hard to constantly update global variable correctly).

Vim is the opposite: no references of execve, only execl (if_cscope.c) and 
execvp. Does this mean something?

There is also interesting comment in bash sources: “SUSv3 says unsetenv returns 
int; existing implementations (BSD) disagree.”. I.e. there is one other 
standard (SUSv3) with unsetenv.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui