From 8b25edfbda6ed8973b483f700571e00a60f27002 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 7 Sep 2023 09:35:59 +0800 Subject: Port Proced to Android * configure.ac (HAVE_PROCFS): Define if opsys is `android'. * src/android.c (android_set_task_name): New function. (android_run_select_thread, android_run_debug_thread): Set the name of the LWP for debugging purposes. * src/process.c (create_process): Set F_SETPIPE_SZ on Android in addition to GNU/Linux. * src/sysdep.c (procfs_ttyname, system_process_attributes) [__ANDROID__]: Enable procfs_ttyname on Android systems. --- src/process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index 08cb810ec13..dbd677e59d7 100644 --- a/src/process.c +++ b/src/process.c @@ -2206,9 +2206,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) inchannel = p->open_fd[READ_FROM_SUBPROCESS]; forkout = p->open_fd[SUBPROCESS_STDOUT]; -#if defined(GNU_LINUX) && defined(F_SETPIPE_SZ) +#if (defined (GNU_LINUX) || defined __ANDROID__) \ + && defined (F_SETPIPE_SZ) fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max); -#endif +#endif /* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ */ } if (!NILP (p->stderrproc)) -- cgit v1.2.1