src/java.base/unix/native/libjli/java_md_solinux.c

Print this page




 921 void SetJavaLauncherPlatformProps() {
 922    /* Linux only */
 923 #ifdef __linux__
 924     const char *substr = "-Dsun.java.launcher.pid=";
 925     char *pid_prop_str = (char *)JLI_MemAlloc(JLI_StrLen(substr) + MAX_PID_STR_SZ + 1);
 926     sprintf(pid_prop_str, "%s%d", substr, getpid());
 927     AddOption(pid_prop_str, NULL);
 928 #endif /* __linux__ */
 929 }
 930 
 931 int
 932 JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
 933         int argc, char **argv,
 934         int mode, char *what, int ret)
 935 {
 936     ShowSplashScreen();
 937     return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
 938 }
 939 
 940 void
 941 PostJVMInit(JNIEnv *env, jstring mainClass, JavaVM *vm)
 942 {
 943     // stubbed out for windows and *nixes.
 944 }
 945 
 946 void
 947 RegisterThread()
 948 {
 949     // stubbed out for windows and *nixes.
 950 }
 951 
 952 /*
 953  * on unix, we return a false to indicate this option is not applicable
 954  */
 955 jboolean
 956 ProcessPlatformOption(const char *arg)
 957 {
 958     return JNI_FALSE;
 959 }


 921 void SetJavaLauncherPlatformProps() {
 922    /* Linux only */
 923 #ifdef __linux__
 924     const char *substr = "-Dsun.java.launcher.pid=";
 925     char *pid_prop_str = (char *)JLI_MemAlloc(JLI_StrLen(substr) + MAX_PID_STR_SZ + 1);
 926     sprintf(pid_prop_str, "%s%d", substr, getpid());
 927     AddOption(pid_prop_str, NULL);
 928 #endif /* __linux__ */
 929 }
 930 
 931 int
 932 JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
 933         int argc, char **argv,
 934         int mode, char *what, int ret)
 935 {
 936     ShowSplashScreen();
 937     return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
 938 }
 939 
 940 void
 941 PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)
 942 {
 943     // stubbed out for windows and *nixes.
 944 }
 945 
 946 void
 947 RegisterThread()
 948 {
 949     // stubbed out for windows and *nixes.
 950 }
 951 
 952 /*
 953  * on unix, we return a false to indicate this option is not applicable
 954  */
 955 jboolean
 956 ProcessPlatformOption(const char *arg)
 957 {
 958     return JNI_FALSE;
 959 }