So are there no work-arounds for this? I notice that there seems to be only the PerlIO interface to the APR file I/O functionality. If there was a more direct Perl API (wherein I could pass the flags I want) this wouldn't be an issue.

Philippe M. Chiasson wrote:
On 20/04/09 19:59 , Marc Adkins wrote:
Originally posted to the APR dev list.  The response (from jTrawick) was
as follows:

    The Perl code that builds the apr_file_open() flags needs to turn on
    APR_WRITE.

    I think that this patch to mod_perl is what you need:

    --- modperl_apr_perlio.c.orig    2007-12-31 02:39:50.000000000 -0500
    +++ modperl_apr_perlio.c    2009-04-20 19:37:25.954107404 -0400
    @@ -85,7 +85,7 @@
switch (*mode) {
           case 'a':
    -        apr_flag = APR_APPEND | APR_CREATE;
    +        apr_flag = APR_WRITE | APR_CREATE | APR_APPEND;
             break;
           case 'w':
             apr_flag = APR_WRITE | APR_CREATE | APR_TRUNCATE;


The rest of this email is my original post.  I would still like a
workaround is one exists.

Looks sensible to me. The only issue I could see is if APR_WRITE was
addeed at some point somewhat recently, and this change would break
against older APRs. Might need a version check of some sort.

Otherwise, +1



--
Marc M. Adkins
Software Development Engineer
520 Pike Street, Suite 500
Seattle, WA  98101
P: 206-331-3508
F: 206.331.3695
E: madk...@marchex.com

Marchex Inc.
www.marchex.com

This e-mail message and any attachments are solely for
intended recipients, and may contain information that is
privileged and confidential.  If you are not the intended
recipient, any dissemination, distribution or copying is
strictly prohibited.  If you believe that you may have
received this message in error, please immediately notify
the sender by replying to this e-mail message.

Reply via email to