Skip to content

Commit

Permalink
[native pos] Extend logging in NativeExecutionProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
arhimondr committed Nov 7, 2023
1 parent 0d350c4 commit 3512441
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -213,6 +213,8 @@ private static long getPid(Process p)
public void close()
{
if (process != null && process.isAlive()) {
long pid = getPid(process);
log.info("Destroying process: %s", pid);
process.destroy();
try {
// This 1 sec is arbitrary. Ideally, we do not need to be give any heads up
@@ -227,12 +229,15 @@ public void close()
}
finally {
if (process.isAlive()) {
log.warn("Graceful shutdown of native execution process failed. Force killing it.");
log.warn("Graceful shutdown of native execution process failed. Force killing it: %s", pid);
process.destroyForcibly();
}
}
}
process = null;
else if (process != null) {
log.info("Process is dead: %s", getPid(process));
process = null;
}
}

public boolean isAlive()

0 comments on commit 3512441

Please sign in to comment.