-
Sub-task
-
Resolution: Fixed
-
P4
-
8
-
b52
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082242 | emb-9 | Dmitry Cherepanov | P4 | Resolved | Fixed | b52 |
1. remove unused functions in deploy code
for example - ExecuteProgram in src/common/windows/native/RegCommon.cpp
2. use common pattern to create process where possible
there's a lot of places with duplicated code:
- creating STARTUPINFO, PROCESS_INFORMATION structures
- calling CreateProcess, WaitForSingleObject
- closing handles
and actually there are several existing functions in deploy code
- ExecuteProgram in src/common/windows/native/RegCommon.cpp
- ExecCommand/ExecCommandEx in src/common/windows/native/common.h
- StartProcess in src/common/windows/native/UpdateConf.cpp
it should be one function in common.h and we should use it in deploy code consistently
3. consider getting rid of CreateProcess and use "safe" ShellExecuteEx where possible
4. Runtime.exec(String) isn't recommended way to execute command - consider using ProcessBuilder
for example - ExecuteProgram in src/common/windows/native/RegCommon.cpp
2. use common pattern to create process where possible
there's a lot of places with duplicated code:
- creating STARTUPINFO, PROCESS_INFORMATION structures
- calling CreateProcess, WaitForSingleObject
- closing handles
and actually there are several existing functions in deploy code
- ExecuteProgram in src/common/windows/native/RegCommon.cpp
- ExecCommand/ExecCommandEx in src/common/windows/native/common.h
- StartProcess in src/common/windows/native/UpdateConf.cpp
it should be one function in common.h and we should use it in deploy code consistently
3. consider getting rid of CreateProcess and use "safe" ShellExecuteEx where possible
4. Runtime.exec(String) isn't recommended way to execute command - consider using ProcessBuilder
- backported by
-
JDK-8082242 Cleanup deploy code related to CreateProcess
-
- Resolved
-