apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r372614 - in /apr/apr/branches/0.9.x: CHANGES test/testpipe.c
Date Thu, 26 Jan 2006 21:38:27 GMT
Author: rooneg
Date: Thu Jan 26 13:38:26 2006
New Revision: 372614

URL: http://svn.apache.org/viewcvs?rev=372614&view=rev
Log:
Merge r371198 to 0.9.x.

Original log message:

Keep testpipe.c from hanging on win32.  Because of the way win32 pipes
work (and I totally don't understand all the details here) we don't get
all the same nonblocking semantics on win32 as we do on unix.  We do
correctly return an error when trying to set timeouts on these kind of
pipes though, so look for that and avoid falling into an uninteruptable
read later if it happens.

* test/testpipe.c
  (test_write): Don't try to make a nonblocking read if we couldn't set
   the timeout, it'll just hang.

* CHANGES: Note change.

Modified:
    apr/apr/branches/0.9.x/CHANGES
    apr/apr/branches/0.9.x/test/testpipe.c

Modified: apr/apr/branches/0.9.x/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/CHANGES?rev=372614&r1=372613&r2=372614&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/CHANGES (original)
+++ apr/apr/branches/0.9.x/CHANGES Thu Jan 26 13:38:26 2006
@@ -1,5 +1,7 @@
 Changes with APR 0.9.8-dev
 
+  *) Keep testpipe.c from hanging on win32. [Garrett Rooney]
+
   *) Documented that apr_stat and apr_dir_read can return APR_INCOMPLETE,
      and how to determine which parts of the resulting apr_finfo_t can be
      used in such a case.

Modified: apr/apr/branches/0.9.x/test/testpipe.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/test/testpipe.c?rev=372614&r1=372613&r2=372614&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/test/testpipe.c (original)
+++ apr/apr/branches/0.9.x/test/testpipe.c Thu Jan 26 13:38:26 2006
@@ -93,8 +93,10 @@
     CuAssertIntEquals(tc, APR_SUCCESS, rv);
 
     rv = apr_file_read(readp, buf, &nbytes);
-    CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv));
-    CuAssertIntEquals(tc, 0, nbytes);
+    if (!rv) {
+      CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv));
+      CuAssertIntEquals(tc, 0, nbytes);
+    }
 }
 
 static void read_write_notimeout(CuTest *tc)



Mime
View raw message