I'd be in favor of removing this word altogether. Slava
On Mon, Feb 15, 2010 at 10:58 PM, Gabriel Cuvillier <[email protected]> wrote: > > I spotted a potential problem in the environment vocabulary. > > The set-os-envs word replaces the current set of environment variables > with a new one from an assoc. > I think this is a little bit problematic because there is no safe and > portable way to implement that operation: > > -> It is not possible with the WIN32 API, and thus the backend word > (set-os-envs) is not implemented on that platform. > -> The way it is implemented for UNIX - by replacing directly the > "environ" global array declared in unistd.h - seems to be unsafe > because the behavior of later calls to "setenv" may be undefined. > > Maybe this word should simply set or add variables from the assoc and > not try to replace the entire set: > > : set-os-envs ( assoc -- ) > [ set-os-env ] assoc-each ; > > It is a more common and portable operation. What do you think? > > Gabriel. > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk > ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
