commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r804223 - in /commons/sandbox/runtime/trunk/src: main/native/test/testcase.c test/org/apache/commons/runtime/TestPrivate.java
Date Fri, 14 Aug 2009 13:33:31 GMT
Author: mturk
Date: Fri Aug 14 13:33:30 2009
New Revision: 804223

URL: http://svn.apache.org/viewvc?rev=804223&view=rev
Log:
Don't use fork() for now

Modified:
    commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testcase.c?rev=804223&r1=804222&r2=804223&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testcase.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testcase.c Fri Aug 14 13:33:30 2009
@@ -678,15 +678,18 @@
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test064)(ACR_JNISTDARGS, jint d)
 {
-#if defined(WIN32)
+#if 1
     return ACR_ShmAttach(_E, shr_name);
 #else
-    if (fork() == 0) {
+    int stat;
+    pid_t child;
+    if ((child = fork()) == 0) {
         int rc = ACR_ShmAttach(_E, shr_name);
         fprintf(stdout, "Attach returned %d errno=%d\n", rc, errno);
         fflush(stdout);
         exit(0);
     }
+    waitpid(child, &stat, 0);
     return 0;
 #endif
 }

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java?rev=804223&r1=804222&r2=804223&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java Fri
Aug 14 13:33:30 2009
@@ -942,7 +942,6 @@
             assertTrue("Shared memory", sb > 0);
             assertEquals("Shared memory size", 1024, test066(sb));
         }
-        Thread.sleep(2000);
         rv = test062(sa);
         assertEquals("Destroy Shared memory", 0, rv);
         if (sb != 0) {



Mime
View raw message