diff options
| author | Po Lu | 2023-05-01 09:31:58 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-01 09:31:58 +0800 |
| commit | 5550816f5962943abd81fbf68901dad575f18c06 (patch) | |
| tree | 9fcb1305b7a3e80a349a9fba6f192d8b348cf7a5 /src/androidfns.c | |
| parent | 9a7c645dd4ef38b72787e932d444a61ed4e04c63 (diff) | |
| download | emacs-5550816f5962943abd81fbf68901dad575f18c06.tar.gz emacs-5550816f5962943abd81fbf68901dad575f18c06.zip | |
Work around system restrictions regarding exec
* doc/emacs/android.texi (Android Environment): Document
`android-use-exec-loader'.
* exec/exec1.c (main): Set program group of child process.
* src/android.c (android_rewrite_spawn_argv): New function.
* src/android.h: Update prototypes.
* src/androidfns.c (syms_of_androidfns): New variable
`android_use_exec_loader'.
* src/callproc.c (emacs_spawn): Rewrite the argument vector to
use exec1 if necessary.
Diffstat (limited to 'src/androidfns.c')
| -rw-r--r-- | src/androidfns.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/androidfns.c b/src/androidfns.c index 3367ebdf755..3bd34edd5b9 100644 --- a/src/androidfns.c +++ b/src/androidfns.c | |||
| @@ -3112,6 +3112,20 @@ Note that if you set this, you will no longer be able to quit Emacs | |||
| 3112 | using the volume down button. */); | 3112 | using the volume down button. */); |
| 3113 | android_pass_multimedia_buttons_to_system = false; | 3113 | android_pass_multimedia_buttons_to_system = false; |
| 3114 | 3114 | ||
| 3115 | DEFVAR_BOOL ("android-use-exec-loader", android_use_exec_loader, | ||
| 3116 | doc: /* Whether or not to bypass system restrictions on program execution. | ||
| 3117 | |||
| 3118 | Android 10 and later prevent programs from executing files installed | ||
| 3119 | in writable directories, such as the application data directory. | ||
| 3120 | |||
| 3121 | When non-nil, Emacs will bypass this restriction by running such | ||
| 3122 | executables under system call tracing, and replacing the `execve' | ||
| 3123 | system call with a version which ignores the system's security | ||
| 3124 | restrictions. | ||
| 3125 | |||
| 3126 | This option has no effect on Android 9 and earlier. */); | ||
| 3127 | android_use_exec_loader = true; | ||
| 3128 | |||
| 3115 | /* Functions defined. */ | 3129 | /* Functions defined. */ |
| 3116 | defsubr (&Sx_create_frame); | 3130 | defsubr (&Sx_create_frame); |
| 3117 | defsubr (&Sxw_color_defined_p); | 3131 | defsubr (&Sxw_color_defined_p); |