mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-25 11:49:44 +01:00
Add comment about mkshrc validity when loading /system/bin/sh for failsafe session
This commit is contained in:
parent
5670128236
commit
93a7525d9b
1 changed files with 7 additions and 1 deletions
|
|
@ -91,7 +91,13 @@ public class TermuxSession {
|
|||
|
||||
if (executionCommand.executable == null) {
|
||||
// Fall back to system shell as last resort:
|
||||
// Do not start a login shell since $HOME/.profile, etc may cause startup failure if they are not valid
|
||||
// Do not start a login shell since ~/.profile may cause startup failure if its invalid.
|
||||
// /system/bin/sh is provided by mksh (not toybox) and does load .mkshrc but for android its set
|
||||
// to /system/etc/mkshrc even though its default is ~/.mkshrc.
|
||||
// So /system/etc/mkshrc must still be valid for failsafe session to start properly.
|
||||
// https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:external/mksh/src/main.c;l=663
|
||||
// https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:external/mksh/src/main.c;l=41
|
||||
// https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:external/mksh/Android.bp;l=114
|
||||
executionCommand.executable = "/system/bin/sh";
|
||||
} else {
|
||||
isLoginShell = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue