Skip to content

Instantly share code, notes, and snippets.

@jb55
Created August 13, 2010 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jb55/523619 to your computer and use it in GitHub Desktop.
Save jb55/523619 to your computer and use it in GitHub Desktop.
node_child_process.cc
16:extern char **environ;
229: // Save environ in the case that we get it clobbered
231: char **save_our_env = environ;
268: environ = env;
277: // Restore environment.
278: environ = save_our_env;
node.js
63: // Set the environ variable NODE_MODULE_CONTEXT=1 to make node load all
node.cc
52:extern char **environ;
1569: for (i = 0; environ[i]; i++) {
1571: for (j = 0; environ[i][j] && environ[i][j] != '='; j++) { ; }
1573: Local<String> field = String::New(environ[i], j);
1575: if (environ[i][j] == '=') {
1576: value = String::New(environ[i]+j+1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment