GNU bug report logs -
#26397
25.1; call-process slow on macOS and slower on larger frames
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Sat, 8 Apr 2017 06:26:02 UTC
Severity: normal
Tags: fixed
Found in version 25.1
Fixed in version 26.1
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 26397 <at> debbugs.gnu.org (full text, mbox):
src/conf_post.h: Remove defines forcing use of fork.
src/process.c (create_process): Use fork if pty_flag is set, otherwise
vfork.
---
src/conf_post.h | 6 ------
src/process.c | 9 +++++++++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/conf_post.h b/src/conf_post.h
index 30c948e39a..95ebd5511c 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -99,12 +99,6 @@ typedef bool bool_bf;
#define realloc unexec_realloc
#define free unexec_free
#endif
-/* The following solves the problem that Emacs hangs when evaluating
- (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile
- does not exist. Also, setsid is not allowed in the vfork child's
- context as of Darwin 9/Mac OS X 10.5. */
-#undef HAVE_WORKING_VFORK
-#define vfork fork
#endif /* DARWIN_OS */
/* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use
diff --git a/src/process.c b/src/process.c
index 2f2e5c1b25..47a85f1c95 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2049,7 +2049,16 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
int volatile forkerr_volatile = forkerr;
struct Lisp_Process *p_volatile = p;
+#ifdef DARWIN_OS
+ /* Darwin doesn't let us run setsid after a vfork, so use fork when
+ necessary. */
+ if (pty_flag)
+ pid = fork ();
+ else
+ pid = vfork ();
+#else
pid = vfork ();
+#endif
current_dir = current_dir_volatile;
lisp_pty_name = lisp_pty_name_volatile;
--
Here’s a tidied up version. If nobody complains I’ll push it in a few
days.
Thanks for your help.
--
Alan Third
This bug report was last modified 3 years and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.