src/windows/classes/java/lang/ProcessImpl.java

Print this page

        

*** 455,466 **** public void destroy() { terminateProcess(handle); } private static native void terminateProcess(long handle); /** * Create a process using the win32 function CreateProcess. * ! * @param cmdstr the Windows commandline * @param envblock NUL-separated, double-NUL-terminated list of * environment strings in VAR=VALUE form * @param dir the working directory of the process, or null if * inheriting the current directory from the parent process * @param stdHandles array of windows HANDLEs. Indexes 0, 1, and --- 455,468 ---- public void destroy() { terminateProcess(handle); } private static native void terminateProcess(long handle); /** * Create a process using the win32 function CreateProcess. + * The method is synchronized due to MS kb315939 problem. + * All native handles should restore the inherit flag at the end of call. * ! * @param cmdstr the Windows command line * @param envblock NUL-separated, double-NUL-terminated list of * environment strings in VAR=VALUE form * @param dir the working directory of the process, or null if * inheriting the current directory from the parent process * @param stdHandles array of windows HANDLEs. Indexes 0, 1, and
*** 472,482 **** * been created. An element of this array is -1 on input * if and only if it is <em>not</em> -1 on output. * @param redirectErrorStream redirectErrorStream attribute * @return the native subprocess HANDLE returned by CreateProcess */ ! private static native long create(String cmdstr, String envblock, String dir, long[] stdHandles, boolean redirectErrorStream) throws IOException; --- 474,484 ---- * been created. An element of this array is -1 on input * if and only if it is <em>not</em> -1 on output. * @param redirectErrorStream redirectErrorStream attribute * @return the native subprocess HANDLE returned by CreateProcess */ ! private static synchronized native long create(String cmdstr, String envblock, String dir, long[] stdHandles, boolean redirectErrorStream) throws IOException;