Jeff Trawick <[EMAIL PROTECTED]> writes:

> The following patch adds a way for an APR app to say that the
> apr_file_t being created from an os file should be treated as a pipe.

c'mon folks, I was counting on somebody to tell me how stupid this
patch was :)  I have a bad attitude about the file/pipe/socket games
in APR which may prevent me from seeing the "right" fix given the
current API.

mod_cgid does:

> -    apr_os_file_put(&tempsock, &sd, 0, r->pool);
> +    apr_os_file_put_ex(&tempsock, &sd, 1, 0, r->pool);

APR provides:

>  /**
> + * convert the file from os specific type to apr type.
> + * @param file The apr file we are converting to.
> + * @param thefile The os specific file to convert
> + * @param ispipe Whether or not the descriptor should be treated as a pipe
> + * @param flags The flags that were used to open this file.
> + * @param cont The pool to use if it is needed.
> + * @remark On Unix, it is only possible to put a file descriptor into
> + *         an apr file type.
> + */
> +APR_DECLARE(apr_status_t) apr_os_file_put_ex(apr_file_t **file,
> +                                             apr_os_file_t *thefile, int 
> is_pipe,
> +                                             apr_int32_t flags, apr_pool_t 
> *cont); 

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...

Reply via email to