Simplify build.gradle
Dieser Commit ist enthalten in:
Ursprung
36a2c0442d
Commit
a6ad9bd63a
13
build.gradle
13
build.gradle
@ -183,19 +183,16 @@ def serverStart(String serverName) {
|
|||||||
writer = proc.getOutputStream().newWriter()
|
writer = proc.getOutputStream().newWriter()
|
||||||
writer.write("stop\n")
|
writer.write("stop\n")
|
||||||
writer.flush()
|
writer.flush()
|
||||||
|
awaitClose(proc, outputThread, inputThread)
|
||||||
while (proc.alive) {
|
|
||||||
Thread.sleep(10)
|
|
||||||
}
|
|
||||||
proc.closeStreams()
|
|
||||||
outputThread.interrupt()
|
|
||||||
inputThread.interrupt()
|
|
||||||
}
|
}
|
||||||
|
awaitClose(proc, outputThread, inputThread)
|
||||||
|
}
|
||||||
|
|
||||||
|
private static def awaitClose(Process proc, Thread outputThread, Thread inputThread) {
|
||||||
while (proc.alive) {
|
while (proc.alive) {
|
||||||
Thread.sleep(10)
|
Thread.sleep(10)
|
||||||
}
|
}
|
||||||
|
proc.closeStreams()
|
||||||
outputThread.interrupt()
|
outputThread.interrupt()
|
||||||
inputThread.interrupt()
|
inputThread.interrupt()
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren