You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2002/06/04 05:07:15 UTC

New apr_os_file_put flags value APR_FILE_PIPECHECK?

I've noticed that we do very little to handle pipes correctly in 
apr_os_file_put().

Would it make sense to introduce APR_FILE_PIPECHECK to ask
apr_os_file_put() to first check an apr_file_info_get() of the handle, and
set the flags correctly if this is a pipe device (e.g. pass this flag for
apr_file_open_stdin/out/err when those are pipes?)

Bill


Re: New apr_os_file_put flags value APR_FILE_PIPECHECK?

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 3 Jun 2002, William A. Rowe, Jr. wrote:

> Would it make sense to introduce APR_FILE_PIPECHECK to ask
> apr_os_file_put() to first check an apr_file_info_get() of the handle, and
> set the flags correctly if this is a pipe device (e.g. pass this flag for
> apr_file_open_stdin/out/err when those are pipes?)

I'm of two minds on this.  On one hand, it makes sense, but at the same
time, "PIPECHECK" seems to be a bit more information about the internal
implementation than usual.  Conversely I suppose we could go with a flag
to say "this is definitely a file," but then again most of the callers to
os_file_put are probably already right, so it makes sense to have the
burden of the flag only on the infrequent case (the one where it ISN'T
already known to be a file).  Hmmmmmm...

--Cliff