1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00

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.
This commit is contained in:
Po Lu 2023-05-01 09:31:58 +08:00
parent 9a7c645dd4
commit 5550816f59
6 changed files with 136 additions and 4 deletions

View file

@ -3112,6 +3112,20 @@ Note that if you set this, you will no longer be able to quit Emacs
using the volume down button. */);
android_pass_multimedia_buttons_to_system = false;
DEFVAR_BOOL ("android-use-exec-loader", android_use_exec_loader,
doc: /* Whether or not to bypass system restrictions on program execution.
Android 10 and later prevent programs from executing files installed
in writable directories, such as the application data directory.
When non-nil, Emacs will bypass this restriction by running such
executables under system call tracing, and replacing the `execve'
system call with a version which ignores the system's security
restrictions.
This option has no effect on Android 9 and earlier. */);
android_use_exec_loader = true;
/* Functions defined. */
defsubr (&Sx_create_frame);
defsubr (&Sxw_color_defined_p);