equal
deleted
inserted
replaced
489 |
489 |
490 private static native boolean isProcessAlive(long handle); |
490 private static native boolean isProcessAlive(long handle); |
491 |
491 |
492 /** |
492 /** |
493 * Create a process using the win32 function CreateProcess. |
493 * Create a process using the win32 function CreateProcess. |
|
494 * The method is synchronized due to MS kb315939 problem. |
|
495 * All native handles should restore the inherit flag at the end of call. |
494 * |
496 * |
495 * @param cmdstr the Windows commandline |
497 * @param cmdstr the Windows command line |
496 * @param envblock NUL-separated, double-NUL-terminated list of |
498 * @param envblock NUL-separated, double-NUL-terminated list of |
497 * environment strings in VAR=VALUE form |
499 * environment strings in VAR=VALUE form |
498 * @param dir the working directory of the process, or null if |
500 * @param dir the working directory of the process, or null if |
499 * inheriting the current directory from the parent process |
501 * inheriting the current directory from the parent process |
500 * @param stdHandles array of windows HANDLEs. Indexes 0, 1, and |
502 * @param stdHandles array of windows HANDLEs. Indexes 0, 1, and |
506 * been created. An element of this array is -1 on input |
508 * been created. An element of this array is -1 on input |
507 * if and only if it is <em>not</em> -1 on output. |
509 * if and only if it is <em>not</em> -1 on output. |
508 * @param redirectErrorStream redirectErrorStream attribute |
510 * @param redirectErrorStream redirectErrorStream attribute |
509 * @return the native subprocess HANDLE returned by CreateProcess |
511 * @return the native subprocess HANDLE returned by CreateProcess |
510 */ |
512 */ |
511 private static native long create(String cmdstr, |
513 private static synchronized native long create(String cmdstr, |
512 String envblock, |
514 String envblock, |
513 String dir, |
515 String dir, |
514 long[] stdHandles, |
516 long[] stdHandles, |
515 boolean redirectErrorStream) |
517 boolean redirectErrorStream) |
516 throws IOException; |
518 throws IOException; |