You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Damir Dezeljin <pr...@mbss.org> on 2003/02/18 13:21:23 UTC

Opening a named pipe problem

Hi.

I created a named pipe file on the FS by using
apr_file_namedpipe_create(
    "fileName",
    APR_UREAD | APR_UWRITE,
    pool_p);

After that I try to open it with:
rv = apr_file_open(
    &pointer_to_apr_file,
    "fileName",
    APR_WRITE | APR_APPEND | APR_BINARY,
    APR_OS_DEFAULT,
    pool_p);

It seams that this call blocks (the program just stop running there).
Maybe this is because some 'blocking' pipe properties. However I didn't
find an answer to the question 'how to open a named_pipe without blocking.

Any hint?

Regards,
Dezo


Re: Opening a named pipe problem

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Mark em all up @deprecated and we will triage at 1.0.

And you are right, the interface was entirely unsuited.

Bill

At 11:53 AM 2/18/2003, Justin Erenkrantz wrote:
>--On Tuesday, February 18, 2003 1:21 PM +0100 Damir Dezeljin <pr...@mbss.org> wrote:
>
>>I created a named pipe file on the FS by using
>>apr_file_namedpipe_create(
>>    "fileName",
>>    APR_UREAD | APR_UWRITE,
>>    pool_p);
>
>Hmm, that's funny.  I thought APR didn't have named pipe support.  I guess it's been there for a while.  It isn't portable, nor is it used anywhere.
>
>OS/2's implementation says it all:
>
>APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool)
>{
>   /* Not yet implemented, interface not suitable */
>   return APR_ENOTIMPL;
>}
>
>ISTR, Ryan and OtherBill saying that named pipes could never be implemented portably.  We should probably yank this, or fix the interface so it can be implemented.  (I'll tend towards yank.)  -- justin



Re: Opening a named pipe problem

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Tuesday, February 18, 2003 1:21 PM +0100 Damir Dezeljin 
<pr...@mbss.org> wrote:

> I created a named pipe file on the FS by using
> apr_file_namedpipe_create(
>     "fileName",
>     APR_UREAD | APR_UWRITE,
>     pool_p);

Hmm, that's funny.  I thought APR didn't have named pipe support.  I 
guess it's been there for a while.  It isn't portable, nor is it used 
anywhere.

OS/2's implementation says it all:

APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char 
*filename, apr_fileperms_t perm, apr_pool_t *pool)
{
    /* Not yet implemented, interface not suitable */
    return APR_ENOTIMPL;
}

ISTR, Ryan and OtherBill saying that named pipes could never be 
implemented portably.  We should probably yank this, or fix the 
interface so it can be implemented.  (I'll tend towards yank.)  -- 
justin