Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
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
DEMO
spring-boot
Commits
02de6e35
Commit
02de6e35
authored
Jun 09, 2014
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove signal handling race condition from RunProcess
Fixes #1061
parent
0b7836b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
RunProcess.java
...ava/org/springframework/boot/loader/tools/RunProcess.java
+6
-9
No files found.
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java
View file @
02de6e35
...
...
@@ -30,6 +30,7 @@ import org.springframework.util.ReflectionUtils;
*
* @author Phillip Webb
* @author Dave Syer
* @author Andy Wilkinson
* @since 1.1.0
*/
public
class
RunProcess
{
...
...
@@ -59,9 +60,10 @@ public class RunProcess {
builder
.
redirectErrorStream
(
true
);
boolean
inheritedIO
=
inheritIO
(
builder
);
try
{
this
.
process
=
builder
.
start
();
Process
process
=
builder
.
start
();
this
.
process
=
process
;
if
(!
inheritedIO
)
{
redirectOutput
(
this
.
process
);
redirectOutput
(
process
);
}
SignalUtils
.
attachSignalHandler
(
new
Runnable
()
{
@Override
...
...
@@ -70,15 +72,10 @@ public class RunProcess {
}
});
try
{
this
.
process
.
waitFor
();
return
process
.
waitFor
();
}
catch
(
InterruptedException
ex
)
{
Thread
.
currentThread
().
interrupt
();
}
try
{
return
this
.
process
.
exitValue
();
}
catch
(
IllegalThreadStateException
e
)
{
return
1
;
}
}
...
...
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