This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author majid
Recipients loewis, majid
Date 2007-12-22.01:05:26
SpamBayes Score 0.07058128
Marked as misclassified No
Message-id <1198285527.13.0.255145812754.issue1684@psf.upfronthosting.co.za>
In-reply-to
Content
There isn't any normative reference that I know of, in fact the default
behavior is different on Unix and Windows.

Apache 2.2 (and most certainly older versions as well) implements this
in mod_cgi.c. The relevant lines:

    /* Transmute ourselves into the script.
     * NB only ISINDEX scripts get decoded arguments.
     */
    if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
        ((rc = apr_procattr_io_set(procattr,
                                   e_info->in_pipe,
                                   e_info->out_pipe,
                                   e_info->err_pipe)) != APR_SUCCESS) ||
        ((rc = apr_procattr_dir_set(procattr,
                        ap_make_dirstr_parent(r->pool,
                                              r->filename))) !=
APR_SUCCESS) ||



apr_procattr_dir_set sets the cwd for the child subprocess
ap_make_dirstr_parent is equivalent to os.path.dirname.

As the default behavior is system-dependent, it should not be hardcoded
but some sort of hook should provided to allow implementing either the
UNIX or Windows semantics.
History
Date User Action Args
2007-12-22 01:05:27majidsetspambayes_score: 0.0705813 -> 0.07058128
recipients: + majid, loewis
2007-12-22 01:05:27majidsetspambayes_score: 0.0705813 -> 0.0705813
messageid: <1198285527.13.0.255145812754.issue1684@psf.upfronthosting.co.za>
2007-12-22 01:05:27majidlinkissue1684 messages
2007-12-22 01:05:26majidcreate