aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidfns.c
diff options
context:
space:
mode:
authorPo Lu2023-05-01 09:31:58 +0800
committerPo Lu2023-05-01 09:31:58 +0800
commit5550816f5962943abd81fbf68901dad575f18c06 (patch)
tree9fcb1305b7a3e80a349a9fba6f192d8b348cf7a5 /src/androidfns.c
parent9a7c645dd4ef38b72787e932d444a61ed4e04c63 (diff)
downloademacs-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.c14
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
3112using the volume down button. */); 3112using 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
3118Android 10 and later prevent programs from executing files installed
3119in writable directories, such as the application data directory.
3120
3121When non-nil, Emacs will bypass this restriction by running such
3122executables under system call tracing, and replacing the `execve'
3123system call with a version which ignores the system's security
3124restrictions.
3125
3126This 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);