Skip to content

Commit

Permalink
Be slightly smarter when trying to figure whether to inherit the
Browse files Browse the repository at this point in the history
server process environment variables.


git-svn-id: svn://cherokee-project.com/cherokee/trunk@3542 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Aug 12, 2009
1 parent 9c188a4 commit 9b3cd10
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cherokee/source_interpreter.c
Expand Up @@ -259,9 +259,6 @@ cherokee_source_interpreter_configure (cherokee_source_interpreter_t *src, chero
} else if (equal_buf_str (&child->key, "debug")) {
src->debug = !! atoi (child->val.buf);

} else if (equal_buf_str (&child->key, "env_inherited")) {
src->env_inherited = !! atoi (child->val.buf);

} else if (equal_buf_str (&child->key, "timeout")) {
src->timeout = atoi (child->val.buf);

Expand Down Expand Up @@ -302,9 +299,21 @@ cherokee_source_interpreter_configure (cherokee_source_interpreter_t *src, chero
ret = cherokee_source_interpreter_add_env (src, child2->key.buf, child2->val.buf);
if (ret != ret_ok) return ret;
}

} else if (equal_buf_str (&child->key, "env_inherited")) {
/* Handled later on */
}
}

/* Inherited Environment
*/
ret = cherokee_config_node_get (conf, "env_inherited", &child);
if (ret == ret_ok) {
src->env_inherited = !! atoi (child->val.buf);
} else {
src->env_inherited = (src->custom_env_len == 0);
}

/* Sanity check
*/
if (cherokee_buffer_is_empty (&src->interpreter)) {
Expand Down

0 comments on commit 9b3cd10

Please sign in to comment.