apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] mod_cgid tells APR that an os file is a pipe
Date Wed, 02 Oct 2002 13:53:40 GMT
Jeff Trawick <trawick@attglobal.net> 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 | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message