Skip to content

Commit

Permalink
JENKINS-10785 failure to terminate logcat reading for android emulator
Browse files Browse the repository at this point in the history
safely close logcatStream after killing the logcatProcess.
  • Loading branch information
oldelvet committed Sep 7, 2011
1 parent aaa15e3 commit 3890aa7
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -531,12 +531,16 @@ private void cleanUp(PrintStream logger, Launcher launcher, AndroidSdk androidSd

// Clean up logging process
if (logcatProcess != null) {
logcatStream.close();
if (killed && logcatProcess.isAlive()) {
// This should have stopped when the emulator was,
// but if not attempt to kill the process manually
logcatProcess.kill();
}
try {
logcatStream.close();
} catch (Exception e) {
// Ignore
}

// Archive the logs
if (logcatFile.length() != 0) {
Expand Down

0 comments on commit 3890aa7

Please sign in to comment.