Skip to content

Commit

Permalink
Add logging / checks when spawning kernel in ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jun 4, 2024
1 parent 0c0c9fb commit 90d6341
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ class KernelLauncher(
else
Map.empty[String, String]

assert(proc == null)
proc = os.proc(command).spawn(
cwd = dir,
env = extraEnv ++ specExtraEnv,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ object Launcher extends CaseApp[LauncherOptions] {
setDaemon(true)
override def run(): Unit =
if (p.isAlive()) {
System.err.println("Shutting down underlying kernel")
p.close()
val timeout = 500.millis
if (!p.waitFor(timeout.toMillis)) {
Expand All @@ -213,6 +214,7 @@ object Launcher extends CaseApp[LauncherOptions] {
)
p.destroyForcibly()
}
System.err.println("Shut down underlying kernel")
}
}
Runtime.getRuntime.addShutdownHook(hook)
Expand Down

0 comments on commit 90d6341

Please sign in to comment.