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 Nov 9, 2023
1 parent e3555f1 commit 0576c15
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 @@ -469,6 +469,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 @@ -204,6 +204,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 @@ -212,6 +213,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 0576c15

Please sign in to comment.