From: Donald A. <as...@tr...> - 2012-11-22 01:02:51
|
Joe English <jen...@fl...> writes: > I had in mind something more: Tcl should not try to keep > the "real" process environment in sync with 'env' at all -- > that's the part that is nonthreadsafe, after all. > > Instead, each interp should have its own $::env array, > initialized either from environ[] or from the contents > of the parent interp's ::env at the time of creation. > [exec], [open "|..."] et al. would pass the content > of the calling interp's ::env array as the third argument > to execve() or the seventh (?) argument to CreateProcess(). > > This also avoids a number of portability problems surrounding > putenv() / setenv() -- Tcl would simply never call them. I think that is a good system. -- Donald Arseneau as...@tr... |