Commits

Anonymous committed 7ed00a2

not use fork

Comments (0)

Files changed (1)

 }
 
 JNIEXPORT jboolean JNICALL Java_jp_co_itpl_ocamlandroid_Native_start (JNIEnv *env, jclass clazz, jstring name_) {
-  LOGD("entry: prepare_stream");
+  LOGD("entry: start");
   const jbyte *name = (*env)->GetStringUTFChars(env, name_, NULL);
   if (name == NULL) {
     return JNI_FALSE;
   }
   
-  pid_t parent_pgid = getpgid(0);
+  start_caml(name);
+  /*pid_t parent_pgid = getpgid(0);
   if(parent_pgid==-1) { LOGE("getpgid failed."); }
   
   if(fork()==0) {
     exit(0);
   } else {
     LOGI("parent:forked caml process");
-  }
+  }*/
   (*env)->ReleaseStringUTFChars(env, name_, name);
-  LOGD("exit successful: prepare_stream");
+  LOGD("exit successful: start");
   return JNI_TRUE;
 }