From unknown Sun Jun 22 17:11:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26397 <26397@debbugs.gnu.org> To: bug#26397 <26397@debbugs.gnu.org> Subject: Status: 25.1; call-process slow on macOS and slower on larger frames Reply-To: bug#26397 <26397@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:11:20 +0000 retitle 26397 25.1; call-process slow on macOS and slower on larger frames reassign 26397 emacs submitter 26397 Aaron Jensen severity 26397 normal tag 26397 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 02:25:48 2017 Received: (at submit) by debbugs.gnu.org; 8 Apr 2017 06:25:49 +0000 Received: from localhost ([127.0.0.1]:37001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwjoe-00034Q-ED for submit@debbugs.gnu.org; Sat, 08 Apr 2017 02:25:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwjoc-00034C-3a for submit@debbugs.gnu.org; Sat, 08 Apr 2017 02:25:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwjoT-0004wj-BY for submit@debbugs.gnu.org; Sat, 08 Apr 2017 02:25:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cwjoT-0004wf-86 for submit@debbugs.gnu.org; Sat, 08 Apr 2017 02:25:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwjoP-00027I-Bk for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 02:25:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwjoM-0004vv-0k for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 02:25:29 -0400 Received: from mail-yb0-x22d.google.com ([2607:f8b0:4002:c09::22d]:36620) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cwjoL-0004vp-Pt for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 02:25:25 -0400 Received: by mail-yb0-x22d.google.com with SMTP id i124so21288425ybc.3 for ; Fri, 07 Apr 2017 23:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=PtQlHqF8ggNVHRDYV+3uXodjoVx95zUMd/28X0y9xqU=; b=LlD3hRTwtl8NF4wRTNScAZZX+BB/jtDOu49l1AuOV4xOWAJjPxy0ZSBieb9olnaIJz rJGAW4zQAGrUgBxoaBNb9q+sa4uPNpnRipxjO+JipKgQ1XnygpqNITydA3EOIaUlFKHM kTqEZa/2iVhcU697qCsk2/RKHyk8uD5lMMad+N1D9DeHJ3M19GQFeDLl5HqLxMSt3c7O vBdIg3gbTWti2zY1B4SFeF2YwQVijOw/0Kj2JaC9wQloUsH6lcqxGzvHOW8aKW85FPVr BLRYbXqeOh8T3x3dRznVmSVmpyAql7Vg2wvNKtd1zvzAukLBzhdezxaCyzpsSME8jxNN trYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=PtQlHqF8ggNVHRDYV+3uXodjoVx95zUMd/28X0y9xqU=; b=Ru9KhvvYhR5SLn7+C95xQA11IRjTlfdDh1MlQWHStAg4Mrs13zu/xr6TAcp78LF6iP s2l2R6qBhqAVMzsEMoe4x2X9j0Anjf6bzvlr474kdMEA7g+O/yFGD60i8PT1tzQanAXK gMgbr5dUCtIpxS3NhqAVKDlbO5TyPXGAtTejPGH4+8zFFXLTFGjZCObHL6mML4m5XCAu U7cATfYUG97UNxIGDrxLrM+PAdT3dSTnNHiHz7NxYIYser/FFb5vS80qxHJrc+zGL9lh L1Z4sBHvIbQ8nQ1s3e+kxDGqYnF2Ub6thAqfYfKoxv5tkAqVYF+9GfA3XtO/flcwU0Ba NG0g== X-Gm-Message-State: AFeK/H0RUTz3t1J7pVpGLHUkI0wlhQttZIWJXcIxFQhlkl+adDUSf/lP++8iaZpSn55nOf/nAJzsADkCJ+91FQ== X-Received: by 10.37.87.2 with SMTP id l2mr28459251ybb.142.1491632724568; Fri, 07 Apr 2017 23:25:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Fri, 7 Apr 2017 23:25:24 -0700 (PDT) From: Aaron Jensen Date: Fri, 7 Apr 2017 23:25:24 -0700 Message-ID: Subject: 25.1; call-process slow on macOS and slower on larger frames To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) It seems that `call-process' on macOS is quite a bit slower than it is on linux. Not only that, but the performance degrades as the frame gets larger. Using this as a benchmark in 'emacs -Q': (benchmark 1 '(call-process "/usr/bin/true" nil nil nil)) With a small frame (default emacs size): Elapsed time: 0.003509s With a larger frame (about 1500x1500px): Elapsed time: 0.007011s On Linux it's been reported that times are typically in the 1-2ms range. I originally came across this via this magit issue: https://github.com/magit/magit/issues/2909 because magit, for many common operations, can call call-process many times, making the performance difference significant. Note that people in the thread are seeing even worse performance. Thanks, Aaron In GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1217)) of 2017-04-07 built on aaronmbp.local Windowing system distributor 'Apple', version 10.3.1404 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/25.1/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus/25.1 --with-xml2 --without-dbus --with-gnutls --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained' Configured features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: eros-mode: t projectile-mode: t recentf-mode: t yas-global-mode: t yas-minor-mode: t flyspell-mode: t org-mobile-sync-mode: t magit-auto-revert-mode: t evil-mc-mode: t hl-todo-mode: t global-spacemacs-whitespace-cleanup-mode: t spacemacs-whitespace-cleanup-mode: t ws-butler-global-mode: t ws-butler-mode: t winum-mode: t winner-mode: t volatile-highlights-mode: t global-vi-tilde-fringe-mode: t vi-tilde-fringe-mode: t pupo-mode: t purpose-mode: t spaceline-info-mode: t spaceline-helm-mode: t save-place-mode: t savehist-mode: t popwin-mode: t persp-mode: t Info-breadcrumbs-in-mode-line-mode: t global-git-gutter+-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t global-flycheck-mode: t flx-ido-mode: t eyebrowse-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-search-highlight-persist: t evil-search-highlight-persist: t show-smartparens-global-mode: t show-smartparens-mode: t evil-escape-mode: t global-anzu-mode: t anzu-mode: t eval-sexp-fu-flash-mode: t editorconfig-mode: t dtrt-indent-mode: t diff-auto-refine-mode: t counsel-mode: t ivy-mode: t clean-aindent-mode: t hybrid-mode: t which-key-mode: t override-global-mode: t global-undo-tree-mode: t undo-tree-mode: t evil-mode: t evil-local-mode: t spacemacs-leader-override-mode: t global-spacemacs-leader-override-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t ido-vertical-mode: t global-page-break-lines-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: yas--auto-fill transient-mark-mode: t abbrev-mode: t Recent messages: Added 2 events for today Saving file /Users/aaronjensen/.emacs.d/.cache/work.org... Wrote /Users/aaronjensen/.emacs.d/.cache/work.org Fetched data overwrote /Users/aaronjensen/.emacs.d/.cache/work.org org-mode fontification error in # at 37 org-mode fontification error in # at 55 org-mode fontification error in # at 19 org-mode fontification error in # at 107 Added 2 events for today Load-path shadows: /Users/aaronjensen/.emacs.d/elpa/25.1/org-bullets-20140918.1137/org-bullets hides /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-bullets /Users/aaronjensen/.emacs.d/elpa/25.1/ht-20161015.1945/ht hides /Users/aaronjensen/.emacs.d/core/libs/ht /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-texinfo hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-texinfo /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-publish hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-publish /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-org hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-org /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-odt hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-odt /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-md hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-md /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-man hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-man /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-latex hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-latex /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-icalendar hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-icalendar /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-html hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-html /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-beamer hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-beamer /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ox-ascii hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ox-ascii /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-w3m hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-w3m /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-version hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-version /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-timer hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-timer /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-table hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-table /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-src hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-src /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-rmail hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-rmail /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-protocol hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-protocol /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-plot hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-plot /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-pcomplete hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-pcomplete /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-mouse hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-mouse /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-mobile hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-mobile /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-mhe hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-mhe /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-macs hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-macs /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-macro hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-macro /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-loaddefs hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-loaddefs /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-list hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-list /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-irc hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-irc /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-install hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-install /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-inlinetask hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-inlinetask /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-info hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-info /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-indent hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-indent /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-id hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-id /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-habit hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-habit /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-gnus hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-gnus /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-footnote hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-footnote /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-feed hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-feed /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-faces hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-faces /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-eshell hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-eshell /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-entities hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-entities /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-element hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-element /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-docview hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-docview /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-datetree hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-datetree /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-ctags hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-ctags /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-crypt hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-crypt /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-compat hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-compat /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-colview hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-colview /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-clock hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-clock /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-capture hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-capture /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-bibtex hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-bibtex /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-bbdb hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-bbdb /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-attach hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-attach /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-archive hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-archive /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/org-agenda hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/org-agenda /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-tangle hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-tangle /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-table hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-table /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-sqlite hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-sqlite /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-sql hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-sql /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-shen hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-shen /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-screen hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-screen /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-scheme hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-scheme /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-scala hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-scala /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-sass hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-sass /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-ruby hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-ruby /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-ref hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-ref /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-R hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-R /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-python hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-python /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-plantuml hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-plantuml /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-picolisp hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-picolisp /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-perl hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-perl /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-org hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-org /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-octave hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-octave /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-ocaml hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-ocaml /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-mscgen hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-mscgen /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-maxima hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-maxima /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-matlab hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-matlab /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-makefile hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-makefile /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-lob hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-lob /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-lisp hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-lisp /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-lilypond hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-lilypond /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-ledger hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-ledger /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-latex hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-latex /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-keys hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-keys /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-js hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-js /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-java hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-java /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-io hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-io /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-haskell hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-haskell /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-gnuplot hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-gnuplot /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-fortran hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-fortran /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-exp hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-exp /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-eval hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-eval /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-emacs-lisp hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-emacs-lisp /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-dot hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-dot /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-ditaa hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-ditaa /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-css hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-css /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-core hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-core /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-comint hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-comint /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-clojure hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-clojure /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-calc hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-calc /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-C hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-C /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-awk hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-awk /Users/aaronjensen/.emacs.d/elpa/25.1/org-plus-contrib-20170210/ob-asymptote hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/org/ob-asymptote /Users/aaronjensen/.emacs.d/elpa/25.1/seq-2.19/seq hides /usr/local/Cellar/emacs-plus/25.1/share/emacs/25.1/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug sendmail appt diary-lib diary-loaddefs alchemist alchemist-macroexpand alchemist-company alchemist-help alchemist-complete alchemist-refcard alchemist-phoenix alchemist-compile alchemist-iex alchemist-message alchemist-hooks alchemist-hex alchemist-mix alchemist-info alchemist-goto alchemist-scope alchemist-eval alchemist-interact alchemist-server alchemist-execute alchemist-report alchemist-test-mode alchemist-project alchemist-file alchemist-key alchemist-utils smartparens-elixir flycheck-dialyxir flycheck-credo flycheck-dogma elixir-mode pkg-info epl elixir-smie sh-script executable pp benchmark elp colir smex magit-gitflow vc-git auto-compile packed elisp-slime-nav eros evil-cleverparens evil-cleverparens-text-objects evil-cleverparens-util paredit flycheck-package package-lint finder nameless goto-addr bug-reference auto-highlight-symbol highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters projectile grep compile open-junk-file recentf tree-widget company-files company-keywords company-etags company-gtags company-template company-dabbrev-code company-dabbrev company-capf company org-eldoc evil-org ob-clojure ob-shell org-bullets org-download toc-org clojure-snippets yasnippet flyspell ispell org-indent image-file org-rmail org-mhe org-irc org-info org-gnus nnir org-docview doc-view org-bibtex bibtex org-bbdb org-w3m editorconfig-core editorconfig-core-handle editorconfig-fnmatch org-mobile-sync org-mobile org-agenda org-gcal org-archive ob-elixir ob-http ob-http-mode ob-restclient restclient ox-gfm ox-md ox-reveal ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox orgit org-element avl-tree magithub magithub-ci magithub-issue magithub-proxy magithub-cache magithub-core git-rebase magit-gh-pulls gh gh-users gh-issues gh-pulls gh-repos gh-comments gh-gist gh-oauth gh-api logito gh-cache pcache eieio-base gh-auth gh-url url-http url-auth url-gw evil-magit magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-branch magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert magit-process magit-margin magit-mode magit-git crm magit-section magit-popup org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader request-deferred deferred request url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap alert log4e notifications dbus xml gntp fill-or-unfill company-simple-complete init-typescript init-flyspell init-terminal-cursor evil-terminal-cursor-changer init-org init-magit evil-mc evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars evil-mc-known-commands evil-mc-common hl-todo xterm-color spacemacs-whitespace-cleanup ws-butler winum winner window-purpose-x imenu-list imenu ibuf-ext ibuffer volatile-highlights vi-tilde-fringe tmux spacemacs-purpose-popwin window-purpose window-purpose-fixes window-purpose-prefix-overload window-purpose-switch let-alist window-purpose-layout window-purpose-core window-purpose-configuration window-purpose-utils spaceline-config spaceline-segments spaceline powerline powerline-separators color powerline-themes smartparens-config smartparens-ruby saveplace savehist ruby-test-mode pcre2el rxt re-builder ruby-mode smie popwin persp-mode osx-trash linum ivy-hydra info+ image-mode git-gutter-fringe+ fringe-helper git-gutter+ git-commit with-editor async-bytecomp async tramp-sh server magit-utils log-edit message dired rfc822 mml mml-sec epg mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log docker-tramp tramp-cache tramp tramp-compat tramp-loaddefs trampver shell pcomplete comint ansi-color gh-common gh-profile marshal flycheck-flow flycheck find-func flx-ido eyebrowse format-spec evil-unimpaired f s evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state smartparens dash evil-indent-plus evil-exchange evil-escape evil-args evil-anzu anzu cider-eval-sexp-fu eval-sexp-fu highlight editorconfig rx noutline outline dtrt-indent diff-hl vc-dir ewoc vc vc-dispatcher diff-mode counsel jka-compr esh-util etags xref project swiper ivy flx delsel ivy-overlay ffap clean-aindent-mode adaptive-wrap hybrid-mode exec-path-from-shell evil-evilified-state which-key use-package diminish bind-key hydra lv cus-edit cus-start cus-load evil evil-integration undo-tree diff evil-maps evil-commands evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common windmove thingatpt rect evil-digraphs evil-vars ring info bind-map quelpa url-parse auth-source gnus-util password-cache url-vars package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr json map lisp-mnt hl-line xt-mouse autorevert filenotify disp-table wid-edit monokai-theme finder-inf init-html init-evil core-configuration-layer eieio-compat cl-seq ht cl warnings package epg-config eieio eieio-core ido-vertical-mode ido seq byte-opt bytecomp byte-compile cl-extra help-mode cconv core-spacemacs core-use-package-ext core-transient-state core-micro-state core-toggle core-keybindings core-fonts-support core-spacemacs-buffer core-funcs cl-macs gv core-themes-support core-display-init core-jump core-release-management core-custom-settings core-dotspacemacs core-command-line core-debug edmacro kmacro derived advice profiler easymenu cl-loaddefs cl-lib page-break-lines easy-mmode subr-x pcase time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 1382315 1069177) (symbols 48 78704 104) (miscs 40 2030 4673) (strings 32 216243 449110) (string-bytes 1 7392222) (vectors 16 114771) (vector-slots 8 2277782 350545) (floats 8 4739 6194) (intervals 56 35013 7656) (buffers 976 55)) From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 03:37:35 2017 Received: (at 26397) by debbugs.gnu.org; 8 Apr 2017 07:37:36 +0000 Received: from localhost ([127.0.0.1]:37028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkwB-0004pM-LU for submit@debbugs.gnu.org; Sat, 08 Apr 2017 03:37:35 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:63884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkw8-0004pB-Nu for 26397@debbugs.gnu.org; Sat, 08 Apr 2017 03:37:34 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 46B1DF08F4; Sat, 8 Apr 2017 16:37:29 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Sat, 08 Apr 2017 16:37:29 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Aaron Jensen Subject: Re: bug#26397: 25.1; call-process slow on macOS and slower on larger frames In-Reply-To: References: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >>>>> On Fri, 7 Apr 2017 23:25:24 -0700, Aaron Jensen said: > It seems that `call-process' on macOS is quite a bit slower than it is > on linux. Not only that, but the performance degrades as the frame gets > larger. > Using this as a benchmark in 'emacs -Q': > (benchmark 1 '(call-process "/usr/bin/true" nil nil nil)) > With a small frame (default emacs size): > Elapsed time: 0.003509s > With a larger frame (about 1500x1500px): > Elapsed time: 0.007011s > On Linux it's been reported that times are typically in the 1-2ms range. > I originally came across this via this magit issue: > https://github.com/magit/magit/issues/2909 because magit, for many > common operations, can call call-process many times, making the > performance difference significant. Note that people in the thread are > seeing even worse performance. Probably "fork" copies some GUI resources. That would also explain why the performance is worse on the Mac port, where each frame allocates an extra NSWindow for overlaying. It becomes much faster and seemingly unaffected by the frame size if you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork" in src/conf_post.h. But I'm not sure if it is safe. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 11:47:34 2017 Received: (at 26397) by debbugs.gnu.org; 8 Apr 2017 15:47:34 +0000 Received: from localhost ([127.0.0.1]:38315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsaM-0003v3-2N for submit@debbugs.gnu.org; Sat, 08 Apr 2017 11:47:34 -0400 Received: from mail-yw0-f173.google.com ([209.85.161.173]:36480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsaJ-0003uq-Um for 26397@debbugs.gnu.org; Sat, 08 Apr 2017 11:47:32 -0400 Received: by mail-yw0-f173.google.com with SMTP id j9so21883511ywj.3 for <26397@debbugs.gnu.org>; Sat, 08 Apr 2017 08:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=t34bRgWHkHpFnK/xajiDV8bztpcCEi+Yjv2OgLpN0Ig=; b=htF8extCLT2CmaHk/fLxAhffazUKKKVJAP4fYwPfEOVO2U9YKX1+3nBHpUKb2O/64W jN8JLMzOZOiq1P69rSXH65RSubCQoqpO3P2eKUeVQkdSf9OepX9UKlXGBX2DN+dULRKG RF6K6+u8jggeuX4fPBIzrtlKK45pA3E/pPJO4L1hR6nhpB7TlaEPHgpgMgUEu6nyWuvJ Jb5wc21cQywfHIWtKd82Nn/5O7c8pKnnwaR3kKkgfd2G0gwkzB/AzmcT9eZ1AwIiHiis 2A0RcrUNANpJ5LwrtGNNwzrVIggFMOPH7XsFYgN3OGqs+DUf3hCIFTUKF1PLMvoIv2Mm AX/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=t34bRgWHkHpFnK/xajiDV8bztpcCEi+Yjv2OgLpN0Ig=; b=P3IySdEcm/YmL2SLuQVIOPxm9ytj9WEm3qdq3w4H4UtrMUFwQFMCRKh6AWgT3kPvvO KthREUx6ZYVgRRcCf046kDeuU0G1WLkdBJntmdct6mswnJZEHHGZ5RnERrd7wYW3Sl9a lI0NtcPrHsxsqXCmVhJq+g8cSZ/krGB1XagLy+FJtmY2D7EeZ9xBlodtBuYoD4Dq0O14 uoiCtqb+c+FSGSGfDBtqxp1JTy3QqkYWqtRPVAHShrILaBR+MNnE3nOkEQXQ2O7esiBF sJU3Eh8aPun0F74EBTocpyh5ftLkGSp380h8+RxH3mubQSrOaJAGPOuMN0LB0sIEid11 KflA== X-Gm-Message-State: AN3rC/7AeJIIY61ad1t8xNf/gs0jhhc+9aMnrgIBxvXmrkSZmcEOUCov7P/yt+FAWnKpM9O1+9QpLs2QKy1+HA== X-Received: by 10.13.215.6 with SMTP id z6mr4560631ywd.170.1491666446253; Sat, 08 Apr 2017 08:47:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Sat, 8 Apr 2017 08:47:25 -0700 (PDT) In-Reply-To: References: From: Aaron Jensen Date: Sat, 8 Apr 2017 08:47:25 -0700 Message-ID: Subject: Re: bug#26397: 25.1; call-process slow on macOS and slower on larger frames To: YAMAMOTO Mitsuharu Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sat, Apr 8, 2017 at 12:37 AM, YAMAMOTO Mitsuharu wrote: > > Probably "fork" copies some GUI resources. That would also explain > why the performance is worse on the Mac port, where each frame > allocates an extra NSWindow for overlaying. > > It becomes much faster and seemingly unaffected by the frame size if > you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork" > in src/conf_post.h. But I'm not sure if it is safe. Wow, that does make a big difference. The comment says that Emacs hangs when evaluating: (make-comint "test0" "/nodir/nofile" nil "") But I can not reproduce that currently with vfork. I do not understand the second comment: "Also, setsid is not allowed in the vfork child's context as of Darwin 9/Mac OS X 10.5." How might I test that? I'm happy to run with a build that has this change for a while and see how it goes. Perhaps this is no longer an issue in current macOS? Are there any version specific pragmas for osx? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 15:20:11 2017 Received: (at 26397) by debbugs.gnu.org; 8 Apr 2017 19:20:11 +0000 Received: from localhost ([127.0.0.1]:38457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwvu7-0000sQ-H5 for submit@debbugs.gnu.org; Sat, 08 Apr 2017 15:20:11 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwvu5-0000sC-IG for 26397@debbugs.gnu.org; Sat, 08 Apr 2017 15:20:10 -0400 Received: by mail-wm0-f65.google.com with SMTP id d79so3342353wmi.2 for <26397@debbugs.gnu.org>; Sat, 08 Apr 2017 12:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4tucQYHtFM3QeW/GT6ElMv46bSDhTPGQN9GyEHvgWDE=; b=t/up6xCcYrGMyjtcOyfp5c5TzqZ5d3rPmKfZ59s36/TqbehQ6J1q5+wdgVLH4HcjBl fLlsMxTKPK9TwPHpjSz9w1K7wKkbKr7dclEmOt40rzUFLptM8n3Tfw/l/zWLx7AoHtHd aTUCaza63WV6ncFn2IXGy6gYQvl2MtPNT3hhniCjI0HUtnJdWI3QynbCaQRVKHnRAEe4 xTNxiKTo3xIq8cYIbzwWTjwmstwEbyWgEbfcgbEij2KSiofs0XrR5klnTRLjPojRbDsT Re4YTGzmupVK/OJtSzZ93P56rIXVjfLnUQeNd2pxDMjogR6HMMAA/ptqlpAh6MVgU4Q4 ZOgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=4tucQYHtFM3QeW/GT6ElMv46bSDhTPGQN9GyEHvgWDE=; b=Nj+O/YCHAYXBDCKYTnotqxe8zvzkAbT/Mc5TtDXygbNLe6lG2md0lHob66E68qw5gH ynJ3IRfIhu70UDMWabef6EmwlcbCjYX1b6uV8bTt3/t7Bi1RYApVSkupoI2mfO0RuoyF YMQAYIT5HU6qM4lBkhF5HGworwFVwVPRmYF4036vFuIvZUHIF0heMwBSHVz1nPq/qdl4 7LV32wmVs+T9pbAYO3oEhcwxhhupvSAfHcaPr6Hf+Fn/BOw+Awpe6zEroqayoKr7j2Nl bk05vDH7yHsNIFIFQjcFBWtdYYGffPiX76ogbdXAiUk79hISMXBHpbieeU+bCSq2kQRt 7YjQ== X-Gm-Message-State: AN3rC/5UoUnwmECcGu7jTgNmx2OfDKRcyK/jq7YUSkTGOtXMYmIguSWQ ymUQF/c2IUXEAQ== X-Received: by 10.28.54.7 with SMTP id d7mr4047107wma.114.1491679202855; Sat, 08 Apr 2017 12:20:02 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-6ca6-4e08-5c7a-e665.holly.idiocy.org. [2001:8b0:3f8:8129:6ca6:4e08:5c7a:e665]) by smtp.gmail.com with ESMTPSA id 36sm10828648wrk.15.2017.04.08.12.20.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 12:20:01 -0700 (PDT) Date: Sat, 8 Apr 2017 20:19:59 +0100 From: Alan Third To: Aaron Jensen Subject: Re: bug#26397: 25.1; call-process slow on macOS and slower on larger frames Message-ID: <20170408191959.GA7541@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Sat, Apr 08, 2017 at 08:47:25AM -0700, Aaron Jensen wrote: > On Sat, Apr 8, 2017 at 12:37 AM, YAMAMOTO Mitsuharu > wrote: > > > > Probably "fork" copies some GUI resources. That would also explain > > why the performance is worse on the Mac port, where each frame > > allocates an extra NSWindow for overlaying. > > > > It becomes much faster and seemingly unaffected by the frame size if > > you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork" > > in src/conf_post.h. But I'm not sure if it is safe. > > Wow, that does make a big difference. The comment says that Emacs > hangs when evaluating: > > (make-comint "test0" "/nodir/nofile" nil "") > > But I can not reproduce that currently with vfork. I do not understand > the second comment: "Also, setsid is not allowed in the vfork child's > context as of Darwin 9/Mac OS X 10.5." It looks to me like we could replace the call to setsid with setpgid (0, 0); for Darwin builds. However I can’t tell for sure if that function is allowed after vfork, as I can’t even find any official reference to setsid not being allowed. I’m probably just not looking hard enough. It seems the ‘correct’ solution for macOS is to use posix_spawn instead of (v)fork/exec, but that would probably require a larger change, and Daniel Colascione seems to have looked into it before, and come across this very issue: https://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00078.html He doesn’t seem to have got an answer, though, and Emacs no longer falls back to setpgid on any platform (see commit dd0333b6155c9c3aabdac9418c005e2e5b4796e7). > How might I test that? The call to setsid is inside an `if` that’s to do with ptys. I suspect it must come into play if you’re using Emacs in a text terminal, rather than as a GUI app. I can’t check this just now as my master won’t build... -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 09:02:07 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 13:02:07 +0000 Received: from localhost ([127.0.0.1]:39063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxCTm-0004D9-U8 for submit@debbugs.gnu.org; Sun, 09 Apr 2017 09:02:07 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxCTl-0004Cg-5u for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 09:02:06 -0400 Received: by mail-wm0-f65.google.com with SMTP id d79so5385850wmi.2 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 06:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=m+58+/dUENuiolvb3mCwCadNat26CRQI3a10U+NNQWQ=; b=LD7KJzhVz8kJb9Cn763KZgLb8xE91dFPgI3oz0snOv7X5D8b+1UWSXYR8wrO5GO5+D SgVJO8Z/WooxGyIWSIn3Rk3i76XlhvM/N5hRfI/g78IasG5KJrrp6Djwbqt/gIXqsEE7 11XALNJGUUF92TxNESv/lmqyHypq/lPatfD7SHsnwK0xfz0crCBFqbk7mB2FlF/05pvO yo5sBIzHGXe7nr2HfY0ASbVJciLapVXRHl9bFavtMBVkfu8FhDsupdGe7LKOonLZulc0 WLz5XLXI/2k7SoI3lKdrMZUBNOb1U0cybkdq13k+7xsf8YkvrR1gn3KV90OGdbTfiZ9B IWrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=m+58+/dUENuiolvb3mCwCadNat26CRQI3a10U+NNQWQ=; b=pKBm0S/QllSuyXBh80EsfpggYg9A63Y7X6179hHOudFCiIFhcVrM6hcDV7GA78PxkX 2XNOJ5zGdxYZdLUOQ4SBmMIc+AcXJAR6TZnS8k4nlKqJ3Are7VAqYHpufJ5TchH9d9dU NlcfCBvfWIwLDzQPraY9hASCHbkSDeIGP6ZA9Kc+hrU8zyhUf0uNpK34G8tzdoC3LaF3 4a/tUw6LG3hrgaCA3iqmGYIlCTkFiU4R0SojQ7Wqr+k9a/nEMAv5fCpha12pjogsj5mN CHZtf8tSUkJzR/1Jpkc/j3dXS0dL2FVYlb6Kfc7yknexHcG0mo+KrV9mEQyQXOv++t5+ VmTQ== X-Gm-Message-State: AN3rC/709WwHF2GbJHJ424+jtVW0rkKwq7BnRAIb3+vgFKMPVAH5/72z UmxyeEZT0eiGMQ== X-Received: by 10.28.216.141 with SMTP id p135mr6657230wmg.71.1491742919131; Sun, 09 Apr 2017 06:01:59 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-6ca6-4e08-5c7a-e665.holly.idiocy.org. [2001:8b0:3f8:8129:6ca6:4e08:5c7a:e665]) by smtp.gmail.com with ESMTPSA id z38sm13549312wrc.36.2017.04.09.06.01.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 06:01:58 -0700 (PDT) Date: Sun, 9 Apr 2017 14:01:55 +0100 From: Alan Third To: Aaron Jensen Subject: Re: bug#26397: 25.1; call-process slow on macOS and slower on larger frames Message-ID: <20170409130155.GA59432@breton.holly.idiocy.org> References: <20170408191959.GA7541@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170408191959.GA7541@breton.holly.idiocy.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Sat, Apr 08, 2017 at 08:19:59PM +0100, Alan Third wrote: > On Sat, Apr 08, 2017 at 08:47:25AM -0700, Aaron Jensen wrote: > > On Sat, Apr 8, 2017 at 12:37 AM, YAMAMOTO Mitsuharu > > wrote: > > > > > > Probably "fork" copies some GUI resources. That would also explain > > > why the performance is worse on the Mac port, where each frame > > > allocates an extra NSWindow for overlaying. > > > > > > It becomes much faster and seemingly unaffected by the frame size if > > > you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork" > > > in src/conf_post.h. But I'm not sure if it is safe. > > > > Wow, that does make a big difference. The comment says that Emacs > > hangs when evaluating: > > > > (make-comint "test0" "/nodir/nofile" nil "") > > > > But I can not reproduce that currently with vfork. I can’t reproduce a hang with that command either. > > I do not understand the second comment: "Also, setsid is not > > allowed in the vfork child's context as of Darwin 9/Mac OS X > > 10.5." > > It looks to me like we could replace the call to setsid with > > setpgid (0, 0); > > for Darwin builds. No, forget that. It doesn’t do the same thing at all. If you run Emacs, then M‐x ansi-term RET RET You should get a shell prompt. Using fork/setsid, your shell will be able to do job control, but using vfork it can’t. You can test this by typing the `bg` command. Zsh (and I assume bash, etc.) responds by telling you either there are no jobs, or that the shell has no job control. We could work around this in a rather ugly manner by doing something like: #ifdef DARWIN_OS if (pty_flag) pid = fork (); else pid = vfork (); #else pid = vfork (); #endif which would use fork where we’re expecting to run setsid, and vfork otherwise. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 11:07:35 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 15:07:35 +0000 Received: from localhost ([127.0.0.1]:39863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxERD-0007Kp-6z for submit@debbugs.gnu.org; Sun, 09 Apr 2017 11:07:35 -0400 Received: from mail-yw0-f175.google.com ([209.85.161.175]:35564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxERA-0007Kb-HO for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 11:07:33 -0400 Received: by mail-yw0-f175.google.com with SMTP id d191so50493888ywe.2 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 08:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=AxgiLKtMjFVt03Kyv8nMxppcVhgudwUs4pPGW6UIED8=; b=qSb103Oo//h38fax2A3nb6+vGLeIz1Xpy4jb94mj1mhAvrONzNDnEVit48lpxb15Ge FySdNnciSDO1U4n29y0jEPGSNn8DTitubmIWSlBhsBaQj6XYYKEHKssCgGT6MXVX+iGI ey5uxJ9IYScQfhR7qv9sWYgNh1PjXuj11MMBtuOiUGJQIiCLwRpvkKPfPzlVQd2N7AvA CJva95HneEma7M0O7s9HWOW1DfYVj2ibAO778PyRgpQcSiTYS2RdKrJ20LWgrr8ccD+k qWFhKNBvJZCXJSfNeP0M8L3rktn/Pjvl6efq8icfNxf0CfMyqNRjPB7owsuw1K1hpeMJ Qrlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AxgiLKtMjFVt03Kyv8nMxppcVhgudwUs4pPGW6UIED8=; b=aHoprdNEAoOpOe+YKeGM6Xdg/pjY3ASk8rCE1H4ixRfS4+AaJY10fn6nr0eAJ0acjG j11mtGBpnhJDa+AnzqElk2gu8Jp69zFZOdIbRNkS3geUtn+Z0v1tffqlwrI2HtHeKSMt 2HCBQ6XhPy4yFrqhN1W6if7MXwrgUe3E9O4f2hSglzlXX06K7dUJ75HAjisIKQK/xGX9 VkMrCvaa2/5PTOawcokKVHy0TcgiGimziFDP3zSAIMS6ekn7RWWm3iDjMT+sVWYQQREJ SEd0iby/1c6Omv10EBGnqxPnmoQxvnbiS2S53KlesDx+lio+QzrLjRJGTWvc6njfNEaF /CUQ== X-Gm-Message-State: AFeK/H2HA0kIRkdTM5Zrwax5+mzzsdFngxpI2bIYfKARaNqpAIc+35tMxnjQSndaiH3FIuqr9HYXmi7SJuREUQ== X-Received: by 10.129.121.151 with SMTP id u145mr36663807ywc.247.1491750446921; Sun, 09 Apr 2017 08:07:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Sun, 9 Apr 2017 08:07:26 -0700 (PDT) In-Reply-To: <20170409130155.GA59432@breton.holly.idiocy.org> References: <20170408191959.GA7541@breton.holly.idiocy.org> <20170409130155.GA59432@breton.holly.idiocy.org> From: Aaron Jensen Date: Sun, 9 Apr 2017 08:07:26 -0700 Message-ID: Subject: Re: bug#26397: 25.1; call-process slow on macOS and slower on larger frames To: Alan Third Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) That appears to work for me. Here's the patch I'm trying out: https://gist.githubusercontent.com/aaronjensen/28e26a6c6c0dc767176bc35d5545= d10e/raw/7fbbfa48fcf26d083e38cec9f174cef911a806ca/GNU-Emacs-25.1-OS-X-enabl= e-vfork.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >From 4a9221e2332d85d64978719a43f884b92bf6cb7b Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Sat, 8 Apr 2017 08:32:57 -0700 Subject: [PATCH 1/2] Enable vfork on macOS --- src/conf_post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf_post.h b/src/conf_post.h index 209f60792c..04c5cd6cf6 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -87,8 +87,8 @@ typedef bool bool_bf; (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 +/* #undef HAVE_WORKING_VFORK */ +/* #define vfork fork */ #endif /* DARWIN_OS */ /* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use --=20 2.12.2 >From 9a15fda33bf2b369207701b66cd8f93e2d3a8801 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Sun, 9 Apr 2017 07:43:25 -0700 Subject: [PATCH 2/2] Only vfork if not pty --- src/process.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 7ab92b0102..b49d5970c8 100644 --- a/src/process.c +++ b/src/process.c @@ -1811,7 +1811,14 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) int volatile forkerr_volatile =3D forkerr; struct Lisp_Process *p_volatile =3D p; - pid =3D vfork (); + #ifdef DARWIN_OS + if (pty_flag) + pid =3D fork (); + else + pid =3D vfork (); + #else + pid =3D vfork (); + #endif current_dir =3D current_dir_volatile; lisp_pty_name =3D lisp_pty_name_volatile; --=20 2.12.2 On Sun, Apr 9, 2017 at 6:01 AM, Alan Third wrote: > On Sat, Apr 08, 2017 at 08:19:59PM +0100, Alan Third wrote: >> On Sat, Apr 08, 2017 at 08:47:25AM -0700, Aaron Jensen wrote: >> > On Sat, Apr 8, 2017 at 12:37 AM, YAMAMOTO Mitsuharu >> > wrote: >> > > >> > > Probably "fork" copies some GUI resources. That would also explain >> > > why the performance is worse on the Mac port, where each frame >> > > allocates an extra NSWindow for overlaying. >> > > >> > > It becomes much faster and seemingly unaffected by the frame size if >> > > you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork" >> > > in src/conf_post.h. But I'm not sure if it is safe. >> > >> > Wow, that does make a big difference. The comment says that Emacs >> > hangs when evaluating: >> > >> > (make-comint "test0" "/nodir/nofile" nil "") >> > >> > But I can not reproduce that currently with vfork. > > I can=E2=80=99t reproduce a hang with that command either. > >> > I do not understand the second comment: "Also, setsid is not >> > allowed in the vfork child's context as of Darwin 9/Mac OS X >> > 10.5." >> >> It looks to me like we could replace the call to setsid with >> >> setpgid (0, 0); >> >> for Darwin builds. > > No, forget that. It doesn=E2=80=99t do the same thing at all. > > If you run Emacs, then > > M=E2=80=90x ansi-term RET RET > > You should get a shell prompt. Using fork/setsid, your shell will be > able to do job control, but using vfork it can=E2=80=99t. You can test th= is by > typing the `bg` command. Zsh (and I assume bash, etc.) responds by > telling you either there are no jobs, or that the shell has no job > control. > > We could work around this in a rather ugly manner by doing something like= : > > #ifdef DARWIN_OS > if (pty_flag) > pid =3D fork (); > else > pid =3D vfork (); > #else > pid =3D vfork (); > #endif > > which would use fork where we=E2=80=99re expecting to run setsid, and vfo= rk > otherwise. > > -- > Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 15:19:00 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 19:19:00 +0000 Received: from localhost ([127.0.0.1]:40085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxIMW-00058x-Bn for submit@debbugs.gnu.org; Sun, 09 Apr 2017 15:19:00 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxIMU-00058f-6k for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 15:18:58 -0400 Received: by mail-wm0-f66.google.com with SMTP id q125so6344689wmd.3 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 12:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dk5JTPgV4GgIraSu7rHu8VUFLbHLRgDO4bg41M42e8k=; b=r7VSG61KgUOVTBYOVmDuxnv6fZBOoO1RJRd3bED6UPR4MhzWKTuorAZTiTr3O229Ff t5Ga6SNbdp978s5kaTXRa2ch68IPt2qk+6KDwvAZFs1eZgq26+3rq++dPlmIu2SWDkcR lFxDjOROU2HCHA5PS5Cc986xszxbCj02LsxWwU9BSOh7sP7LvJidMKGlYihjFtxuTZwe ZjP+QeAUv0dfVJwL1a99mAS5Uql0qpel5fg/tiXjdUhaWxsgKSUzXSWvkjIgkbmb9EBj lFuW43wNHCLL+6gT5KOxNUTKQGt+oVY/FDKVSRU1wv3WZ5bxQKyTjWnyAN4cMMnWUKHs ZaTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=dk5JTPgV4GgIraSu7rHu8VUFLbHLRgDO4bg41M42e8k=; b=M8gkVmqKZ+fDHS3W6UZ5/05Kw/NaHiMz3wZO8+If3QJP1nj12f+RzLhTiRY5ARzgXo EAlHz1j0I+jVgQAb3gz3agKgx4UHqHsxBREacR7OORcW6kEJ3gqHyNerLB2zBhY2kQl1 YwZQ5b5DWV5TZlrRoohvLg4pa6h34iEnY1pkTnImeJYSaJlkA+EIWK4xI3GM0IB+8PW8 HCpqxISgkQWoKQ+Unc/8HSsrM82Z696w/J9V6nPi3+MpyI9IsMwvVBpTAQkmCJwGF3ih ImX1NBjjr3wfSAUvuxnjjwxs8tNj63n8XS2q3Wm3HGkNKTB+UIVdVuB2TXfYlOYUqD3g b7KA== X-Gm-Message-State: AN3rC/4NlN/J7QDa1+NgdyflVEjLs4v06WI9gazCzVMOJ7DgPWAolHdAzq8uwHe+bfekow== X-Received: by 10.28.134.136 with SMTP id i130mr5703707wmd.25.1491765532258; Sun, 09 Apr 2017 12:18:52 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-6ca6-4e08-5c7a-e665.holly.idiocy.org. [2001:8b0:3f8:8129:6ca6:4e08:5c7a:e665]) by smtp.gmail.com with ESMTPSA id 36sm14457634wrk.15.2017.04.09.12.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 12:18:51 -0700 (PDT) Date: Sun, 9 Apr 2017 20:18:49 +0100 From: Alan Third To: Aaron Jensen Subject: [PATCH] Use vfork if possible on Darwin (bug#26397) Message-ID: <20170409191849.GA67152@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 16:32:56 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 20:32:56 +0000 Received: from localhost ([127.0.0.1]:40117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxJW4-00071l-Ed for submit@debbugs.gnu.org; Sun, 09 Apr 2017 16:32:56 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:53586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxJW3-00071b-77 for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 16:32:55 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3w1Q460hHsz1qr47; Sun, 9 Apr 2017 22:32:53 +0200 (CEST) Received: from localhost (dynscan01.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3w1Q4560gBz3jgXx; Sun, 9 Apr 2017 22:32:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan01.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ZWTX1rVAB7Ps; Sun, 9 Apr 2017 22:32:52 +0200 (CEST) X-Auth-Info: 8PkH1VsMxM3IQYPA4dQQ8Mv44o5PSOBxmx8AXzNZA8eBZhTHfpAPAXlujjqVB0V4 Received: from igel.home (ppp-88-217-1-173.dynamic.mnet-online.de [88.217.1.173]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 9 Apr 2017 22:32:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 2D4C82C526C; Sun, 9 Apr 2017 22:32:52 +0200 (CEST) From: Andreas Schwab To: Alan Third Subject: Re: bug#26397: [PATCH] Use vfork if possible on Darwin (bug#26397) References: <20170409191849.GA67152@breton.holly.idiocy.org> X-Yow: Everybody is going somewhere!! It's probably a garage sale or a disaster Movie!! Date: Sun, 09 Apr 2017 22:32:52 +0200 In-Reply-To: <20170409191849.GA67152@breton.holly.idiocy.org> (Alan Third's message of "Sun, 9 Apr 2017 20:18:49 +0100") Message-ID: <87r311b9u3.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Aaron Jensen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Apr 09 2017, Alan Third wrote: > src/conf_post.h: Remove defines forcing use of fork. That should list the removed macros. * src/conf_post.h (HAVE_WORKING_VFORK): Don't undef. (vfork): Don't define. > src/process.c (create_process): Use fork if pty_flag is set, otherwise > vfork. That should say that it is only used when DARWIN_OS is defined. * src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is set, otherwise vfork. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 17:34:42 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 21:34:42 +0000 Received: from localhost ([127.0.0.1]:40196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxKTp-00008p-Py for submit@debbugs.gnu.org; Sun, 09 Apr 2017 17:34:41 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxKTo-00008d-O3 for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 17:34:41 -0400 Received: by mail-wr0-f196.google.com with SMTP id t20so26869458wra.2 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 14:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vTXRPDuRjr1EbbUfs5ScRmK/6Uyynqqx+p2ruwLUOc0=; b=Twg6vx8lWk1CCVUqLFvlex55AGA/3/oq02MQ4vIaBJTNcwyaRB8HLq0/PZTbQQIrZW 0ljqi3jQH1igjy9BWSjY2G+5X77yvBn/uRAAQzxKg4yjIXqGfx/o3ZlqIg2Lgl0s7Vfr SsxIejQmWsrb/rQu1v/Aj9/YCh+gWUXQGdE36wdF8+TWZC2N5Bj5ss0PJB7ZaI6tgm3b HRPHl37FepMf5wjsCUwS/0T3E+n+z6NsgSWCDgY8A7dMz7E/TEK04l2BD8BSjKy+LW6p SsIdB7p0WfBhIEzvlbrD0K6Qslo3+EMMMJmeMaWUKy0g4T6shsSaAXZVkIWOTqwUnceK CBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vTXRPDuRjr1EbbUfs5ScRmK/6Uyynqqx+p2ruwLUOc0=; b=CURVsShnmw0r7DKqoGzjK0Qha478KMSDa56wlLknFlivEW2ylh4sahxArhwBnyx0w3 Qzb73cVn5ReKYnErU+UOLg0wRkms0N9yg12OiY3828OkOIowEPrWiXGBT18F/9Q55Js4 atb6hEFlovzXQFp8XAOBxrkzhpBz6xdg9Ta//Bk0OZx0kX6iBHrynynhZs3qNv3WLLkA Vto5OmsdQVgGl1wRs/5LHL35vkcZ8tGMJWUk6MKq13t7EMHxWqIdoEqZNE8FRtbhtbYx S/ILXFpBkSKCr2qNvPh0zzh57srLvpmV1MlcblZjA7QDZiDh63PvB3UcMtlNLSdBO+hM oT2A== X-Gm-Message-State: AN3rC/4p11E/DmskyY8qspVttUVupOCxC+92V9aIkFJImS6Jy8GwTEbFsfnhrawdt07eIw== X-Received: by 10.223.154.129 with SMTP id a1mr14485696wrc.5.1491773674918; Sun, 09 Apr 2017 14:34:34 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-6ca6-4e08-5c7a-e665.holly.idiocy.org. [2001:8b0:3f8:8129:6ca6:4e08:5c7a:e665]) by smtp.gmail.com with ESMTPSA id y11sm14753142wrd.22.2017.04.09.14.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 14:34:34 -0700 (PDT) Date: Sun, 9 Apr 2017 22:34:30 +0100 From: Alan Third To: Andreas Schwab Subject: Re: bug#26397: [PATCH] Use vfork if possible on Darwin (bug#26397) Message-ID: <20170409213430.GA67276@breton.holly.idiocy.org> References: <20170409191849.GA67152@breton.holly.idiocy.org> <87r311b9u3.fsf@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87r311b9u3.fsf@linux-m68k.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Aaron Jensen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) On Sun, Apr 09, 2017 at 10:32:52PM +0200, Andreas Schwab wrote: > On Apr 09 2017, Alan Third wrote: > > > src/conf_post.h: Remove defines forcing use of fork. > > That should list the removed macros. > > * src/conf_post.h (HAVE_WORKING_VFORK): Don't undef. > (vfork): Don't define. > > > src/process.c (create_process): Use fork if pty_flag is set, otherwise > > vfork. > > That should say that it is only used when DARWIN_OS is defined. > > * src/process.c (create_process) [DARWIN_OS]: Use fork if > pty_flag is set, otherwise vfork. Thank you. I’ve fixed those now. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 19:46:18 2017 Received: (at 26397) by debbugs.gnu.org; 9 Apr 2017 23:46:18 +0000 Received: from localhost ([127.0.0.1]:40275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxMXC-0003Gs-Ic for submit@debbugs.gnu.org; Sun, 09 Apr 2017 19:46:18 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxMX9-0003Gg-Q6 for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 19:46:16 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 67B92F08F4; Mon, 10 Apr 2017 08:46:12 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Mon, 10 Apr 2017 08:46:12 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Alan Third Subject: Re: [PATCH] Use vfork if possible on Darwin (bug#26397) In-Reply-To: <20170409191849.GA67152@breton.holly.idiocy.org> References: <20170409191849.GA67152@breton.holly.idiocy.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu , Aaron Jensen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >>>>> On Sun, 9 Apr 2017 20:18:49 +0100, Alan Third said: > src/conf_post.h: Remove defines forcing use of fork. > src/process.c (create_process): Use fork if pty_flag is set, otherwise > vfork. With this patch, setsid in callproc.c gets called in a vfork child context. It results in EPERM on Darwin. According to ChangeLog, setsid in callproc.c seems to be used for disconnecting from the controlling terminal (so as to avoid using /dev/tty accidentally?). 1997-06-11 Paul Eggert * callproc.c (Fcall_process): Use setsid to disconnect child process from controlling terminal. If that is the case (i.e., if we don't have to make the child process a session leader), then we don't need setsid when the Emacs process doesn't have the controlling terminal, which is common for Mac-native GUI sessions. It doesn't apply for TTY or X11 sessions, but fork is not that slow there. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/callproc.c b/src/callproc.c index 1e3d661eef..b3ffeb57af 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -591,6 +591,20 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, pid = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir); #else /* not WINDOWSNT */ +#ifdef DARWIN_OS + /* Darwin doesn't let us run setsid after a vfork, so use fork when + necessary. */ + bool did_fork_p; + int ctfd = emacs_open ("/dev/tty", O_NOCTTY, 0); + + if (ctfd >= 0) + { + emacs_close (ctfd); + pid = fork (); + did_fork_p = true; + } + else +#endif /* vfork, and prevent local vars from being clobbered by the vfork. */ { Lisp_Object volatile buffer_volatile = buffer; @@ -609,6 +623,9 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, callproc_fd_volatile[i] = callproc_fd[i]; pid = vfork (); +#ifdef DARWIN_OS + did_fork_p = false; +#endif buffer = buffer_volatile; coding_systems = coding_systems_volatile; @@ -631,6 +648,9 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, { unblock_child_signal (&oldset); +#ifdef DARWIN_OS + if (did_fork_p) +#endif setsid (); /* Emacs ignores SIGPIPE, but the child should not. */ From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 20:06:28 2017 Received: (at 26397) by debbugs.gnu.org; 10 Apr 2017 00:06:29 +0000 Received: from localhost ([127.0.0.1]:40287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxMqi-0003k7-NG for submit@debbugs.gnu.org; Sun, 09 Apr 2017 20:06:28 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:32838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxMqh-0003js-LZ for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 20:06:27 -0400 Received: by mail-yb0-f196.google.com with SMTP id 206so3416825ybe.0 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 17:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZpFPSv3Yr7Us8ITHBGTqUFQoxQy9AqlT16VH5MwQ8/I=; b=km9cyp+NuHgxNzaOmbbXC7WPbD1l1vuPlRNNiPaUFnfOgoC/QMGR5nRvFPnhs8CleZ hSI7jJAxGzHJIfcRVMR5tnGfgaa3x+CbQjMYNf17dWKO7JaAlUpRv1riRfGPa1XWSg/m kItVKVDLlf8LNjwq7anC5B3k9qUt5zfPZlhGprerQaP3gpKu7hgwTTE1N+66Nx1IL+4C bHduTancrK7Ilt6OlP+Lm5lVD8Y12wM3+Kf4aSmOMM1t09LHeeaKJePUsWdvwZ6MF3gN UPirvwsvffM7+djys5i80pvt1WDgmcsOp3Z9hZVsH9Py060+VYNzRCdERAL/aQatTV0E 2JTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZpFPSv3Yr7Us8ITHBGTqUFQoxQy9AqlT16VH5MwQ8/I=; b=erN4ryqwEVYzeeZss5Vcod4FMDQhbcK8zT8zH3KM1lbVTdAkyzachSX1jsgf67nH5K 07sOIDj3E2T+cFFPAYHDVXvbGKxXQ09dsnOB2wN/JFCgXqGcXfej0bRDspvAotUOxbLX +UGoweIom47sUx/YEwJjnbw4xwnD+Mg9ExB7Wa5O5cbYDGeWE6e8z8s3IwUJ/cA+E7n9 PxLMKmFTubVhPl4NN2/x/pf8yOKKG9fmQP6IVw3D1q1Mq6AtdZcShADMaX50I6Avf1mC m12zCDRVv/LUt3fV+g8uz4SVktxn68pfqqZMkgDErVw+GIMo+q4WeGvvJ/er1TaxB3LU X0aw== X-Gm-Message-State: AFeK/H1iQz7SOXGWfHKCLbIMxRoXrIHnKIzQLd/FAS8aMvQd75IBq7L3M/oRp4tItdKTc09HgHnwQ9Lgn9AYuw== X-Received: by 10.129.121.151 with SMTP id u145mr38009187ywc.247.1491782781762; Sun, 09 Apr 2017 17:06:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Sun, 9 Apr 2017 17:06:21 -0700 (PDT) In-Reply-To: References: <20170409191849.GA67152@breton.holly.idiocy.org> From: Aaron Jensen Date: Sun, 9 Apr 2017 17:06:21 -0700 Message-ID: Subject: Re: [PATCH] Use vfork if possible on Darwin (bug#26397) To: YAMAMOTO Mitsuharu Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sun, Apr 9, 2017 at 4:46 PM, YAMAMOTO Mitsuharu wrote: > According to ChangeLog, setsid in callproc.c seems to be used for > disconnecting from the controlling terminal (so as to avoid using > /dev/tty accidentally?). > > 1997-06-11 Paul Eggert > > * callproc.c (Fcall_process): Use setsid to disconnect child > process from controlling terminal. > > If that is the case (i.e., if we don't have to make the child process > a session leader), then we don't need setsid when the Emacs process > doesn't have the controlling terminal, which is common for Mac-native > GUI sessions. It doesn't apply for TTY or X11 sessions, but fork is > not that slow there. For me, this slows down call-process in TTY emacs by 3ms (from 2.5ms->5.5ms). I typically launch a GUI emacs and connect to the server in TTY via emacsclient, and in that scenario this patch does not slow down call-process in the TTY, but it will affect those who use TTY only, it seems. Aaron From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 21:11:23 2017 Received: (at 26397) by debbugs.gnu.org; 10 Apr 2017 01:11:23 +0000 Received: from localhost ([127.0.0.1]:40322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxNrX-0005Hj-D8 for submit@debbugs.gnu.org; Sun, 09 Apr 2017 21:11:23 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxNrU-0005HX-7u for 26397@debbugs.gnu.org; Sun, 09 Apr 2017 21:11:21 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id DE03FF08FB; Mon, 10 Apr 2017 10:11:11 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Mon, 10 Apr 2017 10:11:16 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Aaron Jensen Subject: Re: [PATCH] Use vfork if possible on Darwin (bug#26397) In-Reply-To: References: <20170409191849.GA67152@breton.holly.idiocy.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Alan Third , YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >>>>> On Sun, 9 Apr 2017 17:06:21 -0700, Aaron Jensen said: > For me, this slows down call-process in TTY emacs by 3ms (from > 2.5ms->5.5ms). I typically launch a GUI emacs and connect to the > server in TTY via emacsclient, and in that scenario this patch does > not slow down call-process in the TTY, but it will affect those who > use TTY only, it seems. Then use "obsolete" ioctl TIOCNOTTY instead of setsid? I'm not familiar with this matter, so could someone check if this is OK? I confirmed that only the controlling terminal of the child process was detached. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/callproc.c b/src/callproc.c index 05048576ce..3f6df422f3 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -52,6 +52,8 @@ along with GNU Emacs. If not, see . */ #include "syswait.h" #include "blockinput.h" #include "frame.h" +#include "systty.h" +#include "keyboard.h" #ifdef MSDOS #include "msdos.h" @@ -626,7 +628,18 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, { unblock_child_signal (&oldset); +#ifdef DARWIN_OS + /* Darwin doesn't let us run setsid after a vfork, so use + TIOCNOTTY when necessary. */ + int j = emacs_open (DEV_TTY, O_RDWR, 0); + if (j >= 0) + { + ioctl (j, TIOCNOTTY, 0); + emacs_close (j); + } +#else setsid (); +#endif /* Emacs ignores SIGPIPE, but the child should not. */ signal (SIGPIPE, SIG_DFL); From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 00:13:32 2017 Received: (at 26397) by debbugs.gnu.org; 10 Apr 2017 04:13:32 +0000 Received: from localhost ([127.0.0.1]:40414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxQho-00018k-2w for submit@debbugs.gnu.org; Mon, 10 Apr 2017 00:13:32 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:36253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxQhj-00018U-Ch for 26397@debbugs.gnu.org; Mon, 10 Apr 2017 00:13:28 -0400 Received: by mail-yb0-f195.google.com with SMTP id l201so4635121ybf.3 for <26397@debbugs.gnu.org>; Sun, 09 Apr 2017 21:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lxtemieq2GbMszqaUubLijLO8lhL5uC4usXKQdMQCqM=; b=EZTiQG+WQ29ACxAzHySBBErUKD7gWVmx1Y7SXsctatblZapvqHcRmYZqu95UDuTo4v /SaajwfAilzp9AP9PrMtUt0SA8fcjmQI1uw5Fi3s5OZoBE9bIbgu8LzNbwgSFGkUFhG1 bv6nnYkNXFP/YJJ1N2nkt7TwlXjmitfdCY8LWL0ngjbn4Llx+n9t2TG/LKTrP+Hktq24 lOIOa8SiCazhoVB3QjbmPqaxWMC2Ce63UQQEbUINDQZPiLHvRD9nN8YjJYY5MmnKjOf/ o0QCr3JT68Aufv3ARgznpTcKL+9HW1UTRfbSGQTwGv6KdtUPUoCX65JDbXVMWcazJbtt BjXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lxtemieq2GbMszqaUubLijLO8lhL5uC4usXKQdMQCqM=; b=RHMoXtU3VwwfJwMxGQLSkIbh/Sp2Ra4+QQs4defKprqNeS/uY1t7s9YDqRey3kch17 /3j/aUGCZ3Y/fiHheVHkzU/LWxWdfmBhEDJXO18LAKFPebIG1ijONAe/sa5CwbtxoUXv X0NGo7qSvlTdGOPXRJ0UdrhIyRhp+pjLJwxdGPzKOAtIiWiZpR2+w4EnQqzIk1ZMrSqQ M8dmi/SS0RLs//xEMGGWniE/r6Kq/kDEsv7dQJUYIwSE3R7uECZkJsvN2Rsb96vk573l VMi3RLcLVlc1MCEbs6jafELAjZyc8Hqdcd+JNrr1tqR5MOUANY6Vgw5wro6uMEj4dsZv EYGQ== X-Gm-Message-State: AN3rC/66z79vxepbe9eYsl8doa83Oc6CLCfIrvRG3d78mqcIsf/HVAYGGjeu0ZJhIZ6s/4x7azuECUEwXNC6cQ== X-Received: by 10.13.215.6 with SMTP id z6mr9149352ywd.170.1491797601839; Sun, 09 Apr 2017 21:13:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Sun, 9 Apr 2017 21:13:21 -0700 (PDT) In-Reply-To: References: <20170409191849.GA67152@breton.holly.idiocy.org> From: Aaron Jensen Date: Sun, 9 Apr 2017 21:13:21 -0700 Message-ID: Subject: Re: [PATCH] Use vfork if possible on Darwin (bug#26397) To: YAMAMOTO Mitsuharu Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sun, Apr 9, 2017 at 6:11 PM, YAMAMOTO Mitsuharu wrote: >>>>>> On Sun, 9 Apr 2017 17:06:21 -0700, Aaron Jensen said: > >> For me, this slows down call-process in TTY emacs by 3ms (from >> 2.5ms->5.5ms). I typically launch a GUI emacs and connect to the >> server in TTY via emacsclient, and in that scenario this patch does >> not slow down call-process in the TTY, but it will affect those who >> use TTY only, it seems. > > Then use "obsolete" ioctl TIOCNOTTY instead of setsid? I'm not > familiar with this matter, so could someone check if this is OK? I > confirmed that only the controlling terminal of the child process was > detached. Performance-wise this worked for me in both TTY and non-TTY. I can't speak to this being an OK approach, however. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 11:42:24 2017 Received: (at 26397) by debbugs.gnu.org; 10 Apr 2017 15:42:24 +0000 Received: from localhost ([127.0.0.1]:41385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxbSS-0003Dj-0l for submit@debbugs.gnu.org; Mon, 10 Apr 2017 11:42:24 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:32834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxbSP-0003DT-EN for 26397@debbugs.gnu.org; Mon, 10 Apr 2017 11:42:22 -0400 Received: by mail-wr0-f195.google.com with SMTP id l28so4858536wre.0 for <26397@debbugs.gnu.org>; Mon, 10 Apr 2017 08:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=/7JtFawtmGGZTu37c1aTpNGz+Wcf8hRjHcN6HTCajaI=; b=t5L4kEW9vqLtSqXdYSvfNZGPFNDxs4r/ICfQA35LcvZ/LvUDYDaW37ndqLrHgfComB Shl5NDAn5LBVA71roP9pAeZyPgvalP5ep9bdPlJGJUYLGAnX7pUicF8fNPPA9EDLYKE1 uMss3BmydWMMDh4TJH3S3m9JiK9/AF0xe9NtoAohhaM1TBlsyv21+KoqciQWolU44nwn NG4TAUQ3MhQNVdHtW34wtT0OqAu+fQAPvd0AqJ3X1sF4vHSYSI4ec4/mMS/NdLcx3Dwk 7A0+zovmj8IABgh/USwoGuof1UzPp3oBWc9dzYB+zKH0ug1X0yqY+txq4UDlZbaQwbV8 Df5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=/7JtFawtmGGZTu37c1aTpNGz+Wcf8hRjHcN6HTCajaI=; b=l2LQC8ZjO3GRPlMwHNTDMHWvJUY+4yeKakZCLT45Ys96FdwVhXrKv5oadX8fKRi07P yVlAkT6f1dISGctY7HrPLm4dDDbriUcirnuKZ0ayio6UKsJq90D9P3bvXwxxElMZJ+Cs SgzWoAn4/S+Oq/nS8WMYtLkwD1lrJ+lBgxDD2QCrOKhslMnFG8TUb7mroK4HQFBeygJP o4PMNpOcgnxnM1n8ut5L0ZEyYn04A56blUGTv+59g0VakgAyVRND9I44ya0QW274tsu1 dDE4eKAJBOBDM7E+me8H8zbRPcLk7TsGHGOQseoNdfPrOoZQ2DuwTuWajwv5knGhKHvI IyCA== X-Gm-Message-State: AN3rC/5TTfYXo6gyCTzoD6N3fFvVY0tjf8fQJLs4W0tBDWlSxSulnxzjhym8VXG8zk1ZNw== X-Received: by 10.223.171.65 with SMTP id r1mr5731151wrc.31.1491838935705; Mon, 10 Apr 2017 08:42:15 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-6ca6-4e08-5c7a-e665.holly.idiocy.org. [2001:8b0:3f8:8129:6ca6:4e08:5c7a:e665]) by smtp.gmail.com with ESMTPSA id t85sm10726731wmt.23.2017.04.10.08.42.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 08:42:14 -0700 (PDT) Date: Mon, 10 Apr 2017 16:42:11 +0100 From: Alan Third To: YAMAMOTO Mitsuharu Subject: [PATCH v2] Use vfork if possible on Darwin (bug#26397) Message-ID: <20170410154211.GA80342@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Alan Third , Aaron Jensen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) * src/conf_post.h (HAVE_WORKING_VFORK): Don't undef. (vfork): Don't define. * src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is set, otherwise vfork. * src/callproc.c (call_process) [DARWIN_OS]: Use TIOCNOTTY to detach the controlling terminal instead of setsid. --- src/callproc.c | 13 +++++++++++++ src/conf_post.h | 6 ------ src/process.c | 9 +++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/callproc.c b/src/callproc.c index 05048576ce..792556c8e0 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -52,6 +52,8 @@ along with GNU Emacs. If not, see . */ #include "syswait.h" #include "blockinput.h" #include "frame.h" +#include "systty.h" +#include "keyboard.h" #ifdef MSDOS #include "msdos.h" @@ -626,7 +628,18 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, { unblock_child_signal (&oldset); +#ifdef DARWIN_OS + /* Darwin doesn't let us run setsid after a vfork, so use + TIOCNOTTY when necessary. */ + int j = emacs_open (DEV_TTY, O_RDWR, 0); + if (j >= 0) + { + ioctl (j, TIOCNOTTY, 0); + emacs_close (j); + } +#else setsid (); +#endif /* Emacs ignores SIGPIPE, but the child should not. */ signal (SIGPIPE, SIG_DFL); 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; -- This patch includes everything so far. I can’t say whether the TIOCNOTTY approach is correct either, unfortunately. Yamamoto‐san, I’m aware this is mostly your work, so if you’d prefer I’m happy for you to commit it in your name. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 11 03:06:36 2017 Received: (at 26397) by debbugs.gnu.org; 11 Apr 2017 07:06:36 +0000 Received: from localhost ([127.0.0.1]:41884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxpsq-0003If-K3 for submit@debbugs.gnu.org; Tue, 11 Apr 2017 03:06:36 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxpso-0003IU-Dr for 26397@debbugs.gnu.org; Tue, 11 Apr 2017 03:06:35 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 49E55F08EA; Tue, 11 Apr 2017 16:06:31 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Tue, 11 Apr 2017 16:06:31 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Alan Third Subject: Re: [PATCH v2] Use vfork if possible on Darwin (bug#26397) In-Reply-To: <20170410154211.GA80342@breton.holly.idiocy.org> References: <20170410154211.GA80342@breton.holly.idiocy.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, Aaron Jensen , YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >>>>> On Mon, 10 Apr 2017 16:42:11 +0100, Alan Third said: > I can=E2=80=99t say whether the TIOCNOTTY approach is correct either, > unfortunately. > Yamamoto=E2=80=90san, I=E2=80=99m aware this is mostly your work, so if y= ou=E2=80=99d prefer > I=E2=80=99m happy for you to commit it in your name. You've set up the commit message and the process.c part. Please add me as a co-author (as described in the CONTRIBUTE file) and commit it if no one is against the TIOCNOTTY approach. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 22:30:05 2017 Received: (at 26397) by debbugs.gnu.org; 18 Apr 2017 02:30:05 +0000 Received: from localhost ([127.0.0.1]:53297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Iu4-0002Bs-NE for submit@debbugs.gnu.org; Mon, 17 Apr 2017 22:30:04 -0400 Received: from mail-yb0-f178.google.com ([209.85.213.178]:34880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Iu2-0002Au-Ic for 26397@debbugs.gnu.org; Mon, 17 Apr 2017 22:30:03 -0400 Received: by mail-yb0-f178.google.com with SMTP id 62so4888584ybg.2 for <26397@debbugs.gnu.org>; Mon, 17 Apr 2017 19:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QMoNcGJlwQpIgorJg4LWGaIztmi9CbIaofAxSGJLcnA=; b=mWUtbpm8FePbuRxZwJMwhHNDTcRIjl9X0o/MxHZTNwUiDPZHu2t6xEbgfAxXBr6GU6 zGy70kai2JOflaxmvHC5G1NBYgHOiePTxMmEDCGDGzxH7iXlLKuyJCxHHDNHPTHekhid +swPXzVpZ4YsPfwHcbZaV5TTxWkN2m6cbxwANJiOVk1kwY8KBgLZWADQYHCMirK40q7B rdxqZTXoKy+Ubcnl/kX8x0suEyTHwabwXVcs0drb8d7YiCe68lqJPJWJMzmKYvHHjcye ZQz2zuRCdYWS2GUjOCNWOBXpMXuMEUGXIVrpEL8tRv5xZUqwM6qxo3VZxnH41MHCMcHf qqJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QMoNcGJlwQpIgorJg4LWGaIztmi9CbIaofAxSGJLcnA=; b=aSy90hsCYLkz6eCyK54mRlUrY0vpsBS4o029EFyFRtVC7iPTNFGrpYcVn50F4iKRgi GIkF7WY/l4xeghhAzKQurjJjVVpz+lIyaIsFha3+y73DSuxN4Oqt7xAFVhacyR8jbOd3 rPd717Ox2gPZfJ6aWpwkCwKXMmo6tyloFSREO3hXAu/nx8c1DoCwY2/8YjI9XqS1E+gW i5pCdsFZ0CuTHAnSOR+JPwJKRmOPnJO9qIEPCs0OPIFttOhyQGdovzMQMpig7tEDZr0N 144Z6ekhtuLxUYi20Gd7tGYf8s1qnmo9fskeisiUrgzpBO1Znr+ZlVrQrHohhIr3QXm4 4Pqg== X-Gm-Message-State: AN3rC/75FFMHo39NdO+hLwKLR4JtLHmL2TLOAXdFd0Nypej3gQzbWMLu KLHQrGe+CqVS1WYUXWfXi7donCICkw== X-Received: by 10.37.174.162 with SMTP id b34mr6842861ybj.125.1492482597004; Mon, 17 Apr 2017 19:29:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.56.132 with HTTP; Mon, 17 Apr 2017 19:29:56 -0700 (PDT) In-Reply-To: <20170410154211.GA80342@breton.holly.idiocy.org> References: <20170410154211.GA80342@breton.holly.idiocy.org> From: Aaron Jensen Date: Mon, 17 Apr 2017 19:29:56 -0700 Message-ID: Subject: Re: [PATCH v2] Use vfork if possible on Darwin (bug#26397) To: Alan Third Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Mon, Apr 10, 2017 at 8:42 AM, Alan Third wrote: > This patch includes everything so far. I've been using this patch all week and no hiccups from what I can tell. I'm really enjoying the new found responsiveness in Magit. Is this ready to apply? From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 18 06:48:46 2017 Received: (at 26397) by debbugs.gnu.org; 18 Apr 2017 10:48:46 +0000 Received: from localhost ([127.0.0.1]:53455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Qgg-0005vt-EY for submit@debbugs.gnu.org; Tue, 18 Apr 2017 06:48:46 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Qge-0005ve-BP for 26397@debbugs.gnu.org; Tue, 18 Apr 2017 06:48:44 -0400 Received: by mail-wm0-f65.google.com with SMTP id q125so13878684wmd.3 for <26397@debbugs.gnu.org>; Tue, 18 Apr 2017 03:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5YLNCKrNxuAFvpn8X/Oi7rKjpWYovNkCYdtpW5ful2Y=; b=vSWeEOkzwmfkiV2iP1sQvCI62npWdzsr0DfYubcrnNtUqXQUcBO1hSxDDE1Nk1Rmit qapz/PqqA6BHcprpt3voEdeqKPJG4ZW+MP6DuI03DuipGsKCOIETMZSj9WTGA0jxeqJV n/1oCFfX48VpZp3IbbqWYJI/Jx/nU3SqwaN6RzaR/+Bmts/Y5uzNBcwRonoYGdCyx0X6 w1l2tq520n554IItXM6CZf0GBiklrKUf6/UEbrf7+3R8VEr0C84ADfF9KMngUs3trBh4 5ojuqkzkTp8NSrpXYpP9hID6VUyYnXtkWuVOZEnTCK4LyyRBdw/4Emj84dcTcHwfCfrV th4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5YLNCKrNxuAFvpn8X/Oi7rKjpWYovNkCYdtpW5ful2Y=; b=M8Dgh2Ma8N7C8++YKH/hS866PC1pUrhD4YdWE+A+TdEeBmNLsquO2bhauZ3qYUy6Kd 1mbyXdUmDBvFQvMfNXz3ndBnO/PcPGBOl8ODU+SOR/h1j9wLs/ppPKaXWvVjY1fg5RyG a7VMbFxy0Tx8LDSh6X9mlN9jfgjjKZUccOmZSLMjaHlFUcA9SVFTeK5MrjDam1ujPS+m U/LPtdMBMXhFxga7tx7IhCXtrj3UXY/3EDS8ZGO4ETOJRfFD4dWpulv+LSIjv7quQTpa CYy582zbiDmNf2ilKryKkURGM1XtbXOMoLJKZsWcF7eGfYXKDqPuUPM6Ku6h01FWJ/5T sPxg== X-Gm-Message-State: AN3rC/6ADrPAFMIsnXaOEb/ntYE0kJ0tWa7hJnzIhM01X0KemGggvbIk BYBUbmoXRwjNAQ== X-Received: by 10.28.234.205 with SMTP id g74mr12973645wmi.13.1492512518390; Tue, 18 Apr 2017 03:48:38 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c942-e657-0685-1838.holly.idiocy.org. [2001:8b0:3f8:8129:c942:e657:685:1838]) by smtp.gmail.com with ESMTPSA id o9sm14480165wmd.4.2017.04.18.03.48.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 03:48:37 -0700 (PDT) Date: Tue, 18 Apr 2017 11:48:35 +0100 From: Alan Third To: Aaron Jensen Subject: Re: [PATCH v2] Use vfork if possible on Darwin (bug#26397) Message-ID: <20170418104835.GA81915@breton.holly.idiocy.org> References: <20170410154211.GA80342@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 26397 Cc: 26397@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Mon, Apr 17, 2017 at 07:29:56PM -0700, Aaron Jensen wrote: > On Mon, Apr 10, 2017 at 8:42 AM, Alan Third wrote: > > This patch includes everything so far. > > I've been using this patch all week and no hiccups from what I can > tell. I'm really enjoying the new found responsiveness in Magit. > > Is this ready to apply? I’ve been using it with no problems either, and nobody’s complained about it, so I’ve just pushed it to master. Thanks! -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 18 06:49:25 2017 Received: (at control) by debbugs.gnu.org; 18 Apr 2017 10:49:26 +0000 Received: from localhost ([127.0.0.1]:53459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0QhJ-0005xA-Ny for submit@debbugs.gnu.org; Tue, 18 Apr 2017 06:49:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0QhI-0005ww-3Y for control@debbugs.gnu.org; Tue, 18 Apr 2017 06:49:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id z129so11280569wmb.1 for ; Tue, 18 Apr 2017 03:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:message-id:to:from:subject; bh=fc+AXB9ieqHVIB41DNZLECnKnD/uCH5oSrdYstjxnRE=; b=uQH3fmSTdPNNdVESyXb41tj0mDHrn2g1P3Fs6fqpR7szy3yrf5yaizsqG9nP/4pV9V 3eUdLFlGZs/66kFJ8gOVkGdK5qGQpKNE2DcmRpmZRgF1aqpd/UEulSC/lbmmLMZhHPr3 xra1jayFWugMGzCzmNn9R8IQaahmR8NnXginl8iHU3qS7+PhgrdDRXJEOT7P92FhxpZ6 j9py2Gr0oae89zrYAaAPYLqDUw89BJVYYFS0kQVkfz8MIN29VT/KsZzYJru86Il4mL8b jTBJaYn4rYbnx3KDKRNNmYktUJDGyUVkgojqpbHgtWzE741XIRlogQTuzJcoHZzc4rpW /UMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:to:from:subject; bh=fc+AXB9ieqHVIB41DNZLECnKnD/uCH5oSrdYstjxnRE=; b=FJfMcarTpB7CTp5PUaV4vA0Q1g2UF1Nf9wnpv0qllbSmpaqkueHsXUPQ31MoLwNBap 5C3DEIme4XuAptoB9ZBydX7w3BMJ+Zjnjm/MzbUvSzYDAV5zNkgDpIqjSVh0uT91xhGv uPutLOUefNs11NDYTZdge2M/xRsu9i6Bfaz7fLz7aWeQHCFqf27lcyuVF0h8yno77/U9 ADCSe81A452p35XAYAzNBA49ZPmGcyK5uD+/nkPtXUG8lpg6amBrr3BtE1EOBeBPPLDX nQzH+yYAJBA+Eqcmm437FgbreTMgEhvVL/rP03OGAHCJcCXKrd+Z/GhVRI2OOZ7g+A/Z ehHA== X-Gm-Message-State: AN3rC/4BQ63tTfkKHvX59WaYFPIL7NOUL87BjVvHFN7PnsFTVOpx/P1C cWawh0IDqht7FCYd8YdtIw== X-Received: by 10.28.107.13 with SMTP id g13mr12492800wmc.117.1492512558198; Tue, 18 Apr 2017 03:49:18 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c942-e657-0685-1838.holly.idiocy.org. [2001:8b0:3f8:8129:c942:e657:685:1838]) by smtp.gmail.com with ESMTPSA id 81sm14455120wmj.9.2017.04.18.03.49.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Apr 2017 03:49:17 -0700 (PDT) Date: Tue, 18 Apr 2017 11:49:03 +0100 Message-Id: To: control@debbugs.gnu.org From: Alan Third Subject: control message for bug #26397 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 26397 fixed close 26397 26.1 From unknown Sun Jun 22 17:11:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 May 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 21:24:09 2021 Received: (at control) by debbugs.gnu.org; 8 Nov 2021 02:24:09 +0000 Received: from localhost ([127.0.0.1]:55467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjuKP-0003OT-4d for submit@debbugs.gnu.org; Sun, 07 Nov 2021 21:24:09 -0500 Received: from mail-pj1-f42.google.com ([209.85.216.42]:46786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjuKM-0003Nv-5Z for control@debbugs.gnu.org; Sun, 07 Nov 2021 21:24:08 -0500 Received: by mail-pj1-f42.google.com with SMTP id x16-20020a17090a789000b001a69735b339so7613863pjk.5 for ; Sun, 07 Nov 2021 18:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=N6r6NtliKFq1HrNT5qSXMJgmiGfI46JfQOCREFWBvao=; b=KWiEAvfhqi2Ob8PI5iFG463zhofiDhKLR8CQ0O+MRGsnPcZy89zyJaiVLzWVjkypuv toWadxU+Ot8bo0KuueDNNzhq1z33ewXtS90+Xdj/RC5x0EI3/NY3AKy0zc5xfYBiFC5Q AxLVIKitq6XreoAt7nFNuu5duYIr56ZqfAlQivQg+5Lq38pdIsejL/FKi/kUHtCf0mop 5g28dleRQ3cQRtUwSLCl/NiKvTRMOiyr+nw9+qbsxFbDq0PKc5frCjYzvTCfe8lun/ZW yblLCP66y+AT6sX0EnQnZpICWzVZPtyzFaxrSrnCfY++Zg33jP+ZJ6GVBi8BeVzZqmg2 obRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=N6r6NtliKFq1HrNT5qSXMJgmiGfI46JfQOCREFWBvao=; b=vIIj1/cn79zzO4nZb1lTe43Ru0WKmrLGZvaGXSbR/7LIn0Kfan4ww+NQe0P46eu6xx q935SOzo5ttmw2vz2burHB9wb7wdbdTyAXD5ZMSrUDPlLz3tbfoNxyVsefr0YUtLfPBf 1TV2zhy1zPx/74/AwVaofj0j/eejXP67/cDuj7RZBVgylqt87yXhbAx2C4KNmMtv/YSX uf4tIYxlIuFU+US8Jmtd3Nh/0E40esBpbeCa7xFjcOPpzly8hRdRMEiiEMfmASBUzvuB hN1XF3bCO5qsxjzGoKNwh31O67DAtqW63jarOWWkIYMGtpsMbpdlWbV2zAfa/uhciG+a 64XA== X-Gm-Message-State: AOAM530yT2N8Itx6yrz6zLHBt571Y8y8+yWmKZJZqDgi+Bglm1fwh5YI szE7l2qovJ6cEAhjBRkyyexAAKQ+ewh6JugU+7V3spg+ X-Google-Smtp-Source: ABdhPJwhfCddSfHQTafzkX6rjVMw90cJ1upTRysH8otwePnX9i4wtORDkk6LG5EuxQuL3q6u6LkJ9uBWj61gm/Zjd9Q= X-Received: by 2002:a17:903:2445:b0:142:2471:644e with SMTP id l5-20020a170903244500b001422471644emr31020908pls.48.1636338239739; Sun, 07 Nov 2021 18:23:59 -0800 (PST) Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Sun, 7 Nov 2021 18:23:59 -0800 Mime-Version: 1.0 X-Superhuman-Draft-ID: draft008246dfab4ce7ab X-Superhuman-Thread-ID: draft00cf49d420eeacd3 From: Aaron Jensen X-Mailer: Superhuman Desktop (2021-10-27T22:05:54Z) X-Superhuman-ID: kvq1ix9e.2c319d19-cfd0-44d9-9433-8d2576c04ecc Date: Sun, 7 Nov 2021 18:23:59 -0800 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: multipart/alternative; boundary="0000000000008319b905d03dafd3" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 26397 Aaron unarchive 26397 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (aaronjensen[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.216.42 listed in list.dnswl.org] 2.0 BLANK_SUBJECT Subject is present but empty 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 TVD_SPACE_RATIO No description available. X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --0000000000008319b905d03dafd3 Content-Type: text/plain; charset="UTF-8" unarchive 26397 Aaron --0000000000008319b905d03dafd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

unar= chive 26397




Aaron

--0000000000008319b905d03dafd3-- From unknown Sun Jun 22 17:11:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Dec 2021 12:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator