Doug Maceachern <[EMAIL PROTECTED]> writes: >patch below also cures (when calling system() with Apache::Upload handles >still alive). seems PerlIO_importFILE() should have a mode argument,
It did but nobody used it and now we have legacy. The thing that world passes as 0 was suppoed to be O_READ style mode. I think it it too late to start honouring that but will gladly do so if that is considered 5.8 worthy. >in >this case we only want to allow reading on the given FILE* > >--- Request/Request.xs~ Sun Jan 20 09:27:35 2002 >+++ Request/Request.xs Thu Jun 13 15:07:28 2002 >@@ -38,6 +38,7 @@ > > #undef __attribute__ > #include "mod_perl.h" >+#include "perliol.h" > > #ifdef WIN32 > >@@ -494,6 +495,7 @@ > CODE: > if ( ( RETVAL = PerlIO_importFILE(ApacheUpload_fh(upload),0) ) == NULL ) > XSRETURN_UNDEF; >+ PerlIOBase((PerlIO*)RETVAL)->flags &= ~PERLIO_F_CANWRITE; > > OUTPUT: > RETVAL Import attempts to find out how FD that FILE * is using is open but that really isn't sufficient. -- Nick Ing-Simmons http://www.ni-s.u-net.com/