Lines Matching refs:env

174 setSIGCHLDHandler(JNIEnv *env)
199 JNU_ThrowInternalError(env, "Can't set SIGCHLD handler");
203 xmalloc(JNIEnv *env, size_t size)
207 JNU_ThrowOutOfMemoryError(env, NULL);
211 #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type)))
248 splitPath(JNIEnv *env, const char *path)
288 Java_java_lang_UNIXProcess_initIDs(JNIEnv *env, jclass clazz)
290 field_exitcode = (*env)->GetFieldID(env, clazz, "exitcode", "I");
293 parentPathv = splitPath(env, parentPath);
295 setSIGCHLDHandler(env);
318 Java_java_lang_UNIXProcess_waitForProcessExit(JNIEnv* env,
452 getBytes(JNIEnv *env, jbyteArray arr)
455 (const char*) (*env)->GetByteArrayElements(env, arr, NULL);
459 releaseBytes(JNIEnv *env, jbyteArray arr, const char* parr)
462 (*env)->ReleaseByteArrayElements(env, arr, (jbyte*) parr, JNI_ABORT);
479 throwIOException(JNIEnv *env, int errnum, const char *defaultDetail)
494 s = JNU_NewStringPlatform(env, errmsg);
496 jobject x = JNU_NewObjectByName(env, "java/io/IOException",
499 (*env)->Throw(env, x);
828 Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env,
861 if ((pprog = getBytes(env, prog)) == NULL) goto Catch;
862 if ((pargBlock = getBytes(env, argBlock)) == NULL) goto Catch;
869 if ((penvBlock = getBytes(env, envBlock)) == NULL) goto Catch;
875 if ((c->pdir = getBytes(env, dir)) == NULL) goto Catch;
879 fds = (*env)->GetIntArrayElements(env, std_fds, NULL);
886 throwIOException(env, errno, "Bad file descriptor");
904 throwIOException(env, errno, START_CHILD_SYSTEM_CALL " failed");
914 throwIOException(env, errnum, "Exec failed");
917 throwIOException(env, errno, "Read failed");
939 releaseBytes(env, prog, pprog);
940 releaseBytes(env, argBlock, pargBlock);
941 releaseBytes(env, envBlock, penvBlock);
942 releaseBytes(env, dir, c->pdir);
949 (*env)->ReleaseIntArrayElements(env, std_fds, fds, 0);
962 Java_java_lang_UNIXProcess_destroyProcess(JNIEnv *env, jobject junk, jint pid)