9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] APE & environ
@ 2013-08-20 17:13 Jeff Sickel
  2013-08-20 17:54 ` Jeff Sickel
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Sickel @ 2013-08-20 17:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I've only now noticed that using APE's putenv() does create an
entry for the variable in /env but does not reset environ (see
/sys/src/ape/lib/ap/plan9/_envsetup.c).  This means that any
subsequent call to getenv() for the variable you're trying to
test will not actually produce your expected result unless you
fork or exec a subprocess that will call _envsetup() again.

It seems a shame that putenv() would need to rebuild environ
each time, but that may be the only option to a clean posixish
solution for APE programs.

-jas




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-21  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 17:13 [9fans] APE & environ Jeff Sickel
2013-08-20 17:54 ` Jeff Sickel
2013-08-20 19:30   ` Jeff Sickel
2013-08-21  1:43     ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).