Skip to content

Commit 2ff5485

Browse files
committed
Add app log thread stopping
1 parent b85eb89 commit 2ff5485

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/kotlin/supervisor/CarpoolSupervisor.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ class CarpoolSupervisor(val pid: Long, val logDir: Path) : UnicastRemoteObject(0
4646

4747
override fun stop() {
4848
LOGGER.info("Stop request received, shutting down applications")
49-
for (app in applications.values) app.handle.destroy()
49+
for (app in applications.values) {
50+
app.handle.destroy()
51+
app.logFileTransferHandle.interrupt()
52+
}
5053
LOGGER.info("Applications shut down, exiting supervisor daemon")
5154
exitProcess(0)
5255
}
@@ -75,6 +78,7 @@ class CarpoolSupervisor(val pid: Long, val logDir: Path) : UnicastRemoteObject(0
7578
}
7679

7780
applications[app.pid()] = ApplicationEntry(app, commandString, appLogFile, transferThread)
81+
LOGGER.info { "Started app [${commandString}] -- PID ${app.pid()}" }
7882
return app.pid()
7983
}
8084

0 commit comments

Comments
 (0)