src/solaris/native/java/lang/UNIXProcess_md.c

Print this page




 938     releaseBytes(env, dir,      c->pdir);
 939 
 940     free(c->argv);
 941     free(c->envv);
 942     free(c);
 943 
 944     if (fds != NULL)
 945         (*env)->ReleaseIntArrayElements(env, std_fds, fds, 0);
 946 
 947     return resultPid;
 948 
 949  Catch:
 950     /* Clean up the parent's side of the pipes in case of failure only */
 951     closeSafely(in [1]);
 952     closeSafely(out[0]);
 953     closeSafely(err[0]);
 954     goto Finally;
 955 }
 956 
 957 JNIEXPORT void JNICALL
 958 Java_java_lang_UNIXProcess_destroyProcess(JNIEnv *env, jobject junk, jint pid)
 959 {
 960     kill(pid, SIGTERM);

 961 }


 938     releaseBytes(env, dir,      c->pdir);
 939 
 940     free(c->argv);
 941     free(c->envv);
 942     free(c);
 943 
 944     if (fds != NULL)
 945         (*env)->ReleaseIntArrayElements(env, std_fds, fds, 0);
 946 
 947     return resultPid;
 948 
 949  Catch:
 950     /* Clean up the parent's side of the pipes in case of failure only */
 951     closeSafely(in [1]);
 952     closeSafely(out[0]);
 953     closeSafely(err[0]);
 954     goto Finally;
 955 }
 956 
 957 JNIEXPORT void JNICALL
 958 Java_java_lang_UNIXProcess_destroyProcess(JNIEnv *env, jobject junk, jint pid, jboolean force)
 959 {
 960     int sig = (force == JNI_TRUE) ? SIGKILL : SIGTERM;
 961     kill(pid, sig);
 962 }