mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Improve TermuxSession and TermuxTask
TermuxSession, TermuxTask and TermuxSessionClientBase have been moved to termux-shared. They are now not dependent on TermuxService anymore and have become abstract so that they can be called from anywhere. TermuxSession.TermuxSessionClient and TermuxTask.TermuxTaskClient interfaces have been created for callbacks, which the TermuxService now implements. The TermuxTask now also supports synchronous command execution as well to run shell commands from anywhere for internal use by termux app and its plugins. TermuxTask now also supports killing the process being run by sending it a SIGKILL. This is used by TermuxService to kill all the TermuxTasks (in addition to TermuxSessions) it manages when it is destroyed, either by user exiting it or by android killing it. Only the tasks that were started by a plugin which **expects** the result back via a pending intent will be killed, but the remaining background tasks will keep on running until the termux app process is killed by android, like by OOM. Check TermuxService.killAllTermuxExecutionCommands() for more details on how TermuxService kills TermuxTasks and TermuxSessions. Fixed null pointer exception when getting terminal transcript if TerminalEmulator not initialized.
This commit is contained in:
@@ -100,9 +100,6 @@
|
||||
<!-- Termux Execution Commands -->
|
||||
<string name="msg_executable_absolute_path">Executable Absolute Path: \"%1$s\"</string>
|
||||
<string name="msg_working_directory_absolute_path">Working Directory Absolute Path: \"%1$s\"</string>
|
||||
<string name="error_sending_sigkill_to_process">Sending SIGKILL to process on user request or because android is killing the service</string>
|
||||
<string name="error_failed_to_execute_termux_session_command">"Failed to execute \"%1$s\" termux session command"</string>
|
||||
<string name="error_failed_to_execute_termux_task_command">"Failed to execute \"%1$s\" termux task command"</string>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user