apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject Re: PR43563 patch for writes to non-blocking pipes on Windows
Date Tue, 09 Oct 2007 00:12:54 GMT
On 10/8/07, Eric Covener <covener@gmail.com> wrote:
> On 10/6/07, Jeff Trawick <trawick@gmail.com> wrote:
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=43563
> >
> > This patch looks reasonable to me; any thoughts from the Windows crowd?
> >
>
> 43522 is a close cousin:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=43522

plz save me some time and help me understand why this first part of
this patch checks APR_READ_BLOCK and APR_WRITE_BLOCK, whereas the part
of the patch for the other two handles checks APR_PARENT_BLOCK and
APR_CHILD_BLOCK (the Unix code checks ...PARENT... and ...CHILD... for
all three handles)

@@ -95,27 +95,75 @@

         if (in == APR_NO_FILE)
             attr->child_in = &no_file;
-        else
+        else {
             stat = apr_create_nt_pipe(&attr->child_in, &attr->parent_in,
                                       in, attr->pool);
+            if (stat == APR_SUCCESS) {
+                switch (in) {
+                    case APR_FULL_BLOCK:
+                        break;
+                    case APR_READ_BLOCK:
+                        apr_file_pipe_timeout_set(attr->parent_in, 0);
+                        break;
+                    case APR_WRITE_BLOCK:
+                        apr_file_pipe_timeout_set(attr->child_in, 0);
+                        break;

Thanks!

Mime
View raw message