mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-08 03:24:04 +08:00
Assure "Process completed" string is written to terminal before session is finished
This commit is contained in:
@@ -340,7 +340,6 @@ public final class TerminalSession extends TerminalOutput {
|
|||||||
if (msg.what == MSG_PROCESS_EXITED) {
|
if (msg.what == MSG_PROCESS_EXITED) {
|
||||||
int exitCode = (Integer) msg.obj;
|
int exitCode = (Integer) msg.obj;
|
||||||
cleanupResources(exitCode);
|
cleanupResources(exitCode);
|
||||||
mClient.onSessionFinished(TerminalSession.this);
|
|
||||||
|
|
||||||
String exitDescription = "\r\n[Process completed";
|
String exitDescription = "\r\n[Process completed";
|
||||||
if (exitCode > 0) {
|
if (exitCode > 0) {
|
||||||
@@ -355,6 +354,8 @@ public final class TerminalSession extends TerminalOutput {
|
|||||||
byte[] bytesToWrite = exitDescription.getBytes(StandardCharsets.UTF_8);
|
byte[] bytesToWrite = exitDescription.getBytes(StandardCharsets.UTF_8);
|
||||||
mEmulator.append(bytesToWrite, bytesToWrite.length);
|
mEmulator.append(bytesToWrite, bytesToWrite.length);
|
||||||
notifyScreenUpdate();
|
notifyScreenUpdate();
|
||||||
|
|
||||||
|
mClient.onSessionFinished(TerminalSession.this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user