Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-cmdexectool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-cmdexectool
Commits
44f4be8f
Commit
44f4be8f
authored
Feb 22, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
803ec9cf
Pipeline
#363
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
AbstractCommandExecutor.java
...scheduler/server/worker/task/AbstractCommandExecutor.java
+8
-4
No files found.
src/main/java/com/jz/dmp/cmdexectool/scheduler/server/worker/task/AbstractCommandExecutor.java
View file @
44f4be8f
...
...
@@ -119,11 +119,12 @@ public abstract class AbstractCommandExecutor {
if
(
OSUtils
.
isWindows
())
{
//init process builder
ProcessBuilderForWin32
processBuilder
=
new
ProcessBuilderForWin32
();
//ProcessBuilderForWin32 processBuilder = new ProcessBuilderForWin32();
ProcessBuilder
processBuilder
=
new
ProcessBuilder
();
// setting up a working directory
processBuilder
.
directory
(
new
File
(
taskExecutionContext
.
getExecutePath
()));
// setting up a username and password
processBuilder
.
user
(
taskExecutionContext
.
getTenantCode
(),
StringUtils
.
EMPTY
);
//
processBuilder.user(taskExecutionContext.getTenantCode(), StringUtils.EMPTY);
// merge error information to standard output stream
processBuilder
.
redirectErrorStream
(
true
);
...
...
@@ -508,8 +509,11 @@ public abstract class AbstractCommandExecutor {
f
.
setAccessible
(
true
);
if
(
OSUtils
.
isWindows
())
{
WinNT
.
HANDLE
handle
=
(
WinNT
.
HANDLE
)
f
.
get
(
process
);
processId
=
Kernel32
.
INSTANCE
.
GetProcessId
(
handle
);
//WinNT.HANDLE handle = (WinNT.HANDLE) f.get(process);
//processId = Kernel32.INSTANCE.GetProcessId(handle);
//processId = f.getInt(process);
Long
processIds
=
f
.
getLong
(
process
);
processId
=
processIds
.
intValue
();
}
else
{
processId
=
f
.
getInt
(
process
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment