apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: svn commit: r917819 - in /apr/apr/trunk: CHANGES file_io/unix/open.c include/apr_file_io.h
Date Tue, 02 Mar 2010 00:25:50 GMT
On 02 Mar 2010, at 2:17 AM, minfrin@apache.org wrote:

> URL: http://svn.apache.org/viewvc?rev=917819&view=rev
> Log:
> Enable platform specific support for the opening of a file or
> pipe in non blocking module through the APR_FOPEN_NONBLOCK flag.

According to the docs at http://msdn.microsoft.com/en-us/library/aa365605%28VS.85%29.aspx

, a patch that might implement the same for Windows might look like  
the patch below:

Disclaimer: I don't have a Windows machine to build it on. Can someone  
with access to Windows verify whether this will work?

Index: file_io/win32/open.c
===================================================================
--- file_io/win32/open.c	(revision 917815)
+++ file_io/win32/open.c	(working copy)
@@ -341,6 +341,10 @@
          oflags |= FILE_WRITE_ATTRIBUTES;
      }

+    if (flag & APR_FOPEN_NONBLOCK) {
+        oflags |= PIPE_NOWAIT;
+    }
+
      if (apr_os_level >= APR_WIN_NT)
          sharemode |= FILE_SHARE_DELETE;


Regards,
Graham
--


Mime
View raw message