From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Troy de Freitas" Newsgroups: gmane.emacs.bugs Subject: bug#53191: 29.0.50; file-notify-add-watch fails for socket files on MacOS Date: Tue, 11 Jan 2022 10:22:01 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4569-g891f756243-fm-20220111.001-g891f7562 To: 53191@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 11 18:21:43 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7Kq6-0001pe-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 18:21:42 +0100 Original-Received: from localhost ([::1]:56126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7Kq5-00016W-IJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 12:21:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7KmZ-0003dm-4n for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:18:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7KmY-0008P8-Qf for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7KmY-0006mf-Ns for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Troy de Freitas" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jan 2022 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53191 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164192145926027 (code B ref -1); Tue, 11 Jan 2022 17:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jan 2022 17:17:39 +0000 Original-Received: from localhost ([127.0.0.1]:55409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7KmA-0006li-2e for submit@debbugs.gnu.org; Tue, 11 Jan 2022 12:17:39 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:47050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7Jus-0002mU-Kx for submit@debbugs.gnu.org; Tue, 11 Jan 2022 11:22:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Jur-0002mR-9R for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 11:22:33 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37173) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Jul-00081H-8y for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 11:22:31 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 30F135C01B7 for ; Tue, 11 Jan 2022 11:22:22 -0500 (EST) Original-Received: from imap42 ([10.202.2.92]) by compute1.internal (MEProxy); Tue, 11 Jan 2022 11:22:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntdef.com; h= mime-version:message-id:date:from:to:subject:content-type; s= mesmtp; bh=r8QvRWNQip/pZwF8GEoaVqmWpmXv4AAss/r4iGUutQI=; b=UbZx8 CSY9Y1iIY9PZKBkHQNjcjHgQbc2NFoVGfHs9uAJvQ/R2i3O0Rdi29j7QhEDYehyE 45dnMH4cZERSlwS79o7JSkAeCVGle8tYK/O5o32DViG7ynDoM1NWIudijSDVGMS1 l7bmhwOZt+WCPwaSVSP4lPGgDQFMedMxh38LE4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=r8QvRWNQip/pZwF8GEoaVqmWpmXv4 AAss/r4iGUutQI=; b=QtXVsMyl8RrACc9uR0EJKxSfl4GAclMx1UiVIPvivoBUL ysnCaigfa3ykvAmcOqiI3+FsM7CyPb0Ur3i0RJEGMXc5A90JFDNRrJBRh21MK+qt udh0KXTgZv7/82254mrPnN19OZ2WZ+K8FCZMYM5iDUPnaeyAMzxHlQ6qw30Kp+Q+ GccJpAmDgpFT+MVhS3Eu6CSzW2bvtuEhIUw0ZRkNT5FPoy0y5SYrHOc2jqzFu9Iv V45HBxU0AeD8NRPP/iHMImtc6/Wf3FIQ/1ChEm/ujMWW9Fq0k/ld303H1MqTb6s4 CfbREau6XChKYY+RN9jG4kmCHqDMaZvbOoRUclV4w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehfedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfvfhrohihucguvgcuhfhrvghithgrshdfuceomhgvsehnthgu vghfrdgtohhmqeenucggtffrrghtthgvrhhnpeeffeelkeetieehleeutedvvdfffffhge evveejtddvueehleetudduuefhteeugeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehmvgesnhhtuggvfhdrtghomh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id EAA6E2180078; Tue, 11 Jan 2022 11:22:21 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=66.111.4.29; envelope-from=me@ntdef.com; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 11 Jan 2022 12:17:37 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223945 Archived-At: This bug affects MacOS (and most likely FreeBSD and OpenBSD as well). On MacOS running `file-notify-add-watch' throws an error when attached to a UNIX socket file but works fine on Linux. To reproduce, using 'emacs -Q', evaluate the following elisp: (let* ((sock "/tmp/netproc.sock") (p (make-network-process :name "test" :family 'local :local sock :server t))) (unwind-protect (file-notify-add-watch sock '(change) (lambda (_) (message (format "%s changed." sock)))) (delete-process p) (delete-file sock))) It throws the error: edebug-signal: File cannot be opened: Operation not supported on socket, /tmp/netproc.sock The issue appears to be in the underlying call to `kqueue-add-watch', which uses `openat()' (by way of `emacs_open()`) to get a file-descriptor. According to the BSD docs for `openat()', calling `openat()' on socket files is not supported. In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5.1 (Build 20G80)) of 2021-10-26 built on C02FW2L5Q05P Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.1 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.50/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.50 --with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained' Configured features: ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 Major mode: Elisp Minor modes in effect: semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode) S))) global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t default-text-scale-mode: t recentf-mode: t vertico-mode: t winner-mode: t windmove-mode: t elisp-slime-nav-mode: t paredit-mode: t aggressive-indent-mode: t highlight-quoted-mode: t display-fill-column-indicator-mode: t rainbow-delimiters-mode: t symbol-overlay-mode: t bug-reference-prog-mode: t goto-address-prog-mode: t dimmer-mode: t global-anzu-mode: t anzu-mode: t flycheck-color-mode-line-mode: t global-flycheck-mode: t flycheck-mode: t diredfl-global-mode: t savehist-mode: t electric-pair-mode: t delete-selection-mode: t global-auto-revert-mode: t global-so-long-mode: t mode-line-bell-mode: t beacon-mode: t global-page-break-lines-mode: t page-break-lines-mode: t whole-line-or-region-global-mode: t whole-line-or-region-local-mode: t hes-mode: t which-key-mode: t global-whitespace-cleanup-mode: t whitespace-cleanup-mode: t global-diff-hl-mode: t projectile-mode: t ipretty-mode: t auto-compile-on-load-mode: t auto-compile-on-save-mode: t auto-compile-mode: t immortal-scratch-mode: t envrc-global-mode: t envrc-mode: t marginalia-mode: t repeat-mode: t desktop-save-mode: t corfu-global-mode: t corfu-mode: t ns-auto-titlebar-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow emacsbug sendmail cal-move info-look proced move-dup eglot array jsonrpc switch-window switch-window-mvborder switch-window-asciiart quail man flymake-cc flymake-proc flymake macrostep-c cmacexp edebug pandoc-mode-utils sort tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet calc-mode calc-yank calc-forms calc-arith calc-alg calc-comb calc-ext calc-misc calc-menu calc calc-loaddefs calc-macs reposition thai-util thai-word lao-util enriched facemenu json-mode json-snatcher slime-tests ert slime-fancy slime-indentation slime-cl-indent cl-indent slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl slime-parse slime-company company slime arc-mode archive-mode hyperspec mail-extr tabify em-unix em-term em-script em-prompt em-ls em-hist em-pred em-glob em-cmpl em-dirs esh-var em-basic em-alias warnings quickrun em-banner eshell esh-mode esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util autoload mm-archive gnutls network-stream url-http url-gw nsm url-cache url-auth vterm term ehelp vterm-module term/xterm xterm macros rect loadhist docker-tramp tramp-cache tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp completion dos-w32 find-cmd debug backtrace apropos find-dired scratch sql vc-annotate vc-filewise ibuffer-vc gitignore-mode conf-mode cl-print shortdoc rainbow-mode ibuffer-projectile sh-script smie embark ffap misearch multi-isearch pulse scala-mode scala-mode-prettify-symbols scala-mode-imenu scala-mode-map scala-mode-fontlock scala-mode-indent scala-mode-paragraph scala-mode-syntax scala-mode-lib help-fns radix-tree magit-patch magit-subtree magit-gitignore magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util wucuo wucuo-sdk find-lisp flyspell ispell info-colors js dired-aux diff-hl-dired magit-extras magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff git-commit log-edit add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell magit-mode transient magit-git magit-section magit-utils crm markdown-mode doom-one-theme doom-themes doom-themes-base consult-vertico consult bookmark executable cus-edit cus-start cus-load default-text-scale recentf tree-widget orderless vertico winner windswap windmove add-node-modules-path typescript-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs elisp-slime-nav etags fileloop xref project view paredit aggressive-indent highlight-quoted display-fill-column-indicator rainbow-delimiters symbol-overlay vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs bug-reference goto-addr dimmer anzu flycheck-color-mode-line face-remap flycheck-package package-lint let-alist imenu finder flycheck dash disp-table vc-git org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils wid-edit ol-docview doc-view image-mode exif dired-x diredfl dired dired-loaddefs ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org-clock org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 time-date ol org-keys oc org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs savehist elec-pair delsel autorevert filenotify so-long mode-line-bell beacon page-break-lines whole-line-or-region highlight-escape-sequences which-key diminish whitespace-cleanup-mode whitespace diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode projectile lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep compile text-property-search comint ring ibuf-ext ibuffer ibuffer-loaddefs thingatpt jka-compr ipretty advice auto-compile packed immortal-scratch uptimes pp envrc inheritenv server init init-local pcase marginalia init-locales session sanityinc-tomorrow-bright-theme color-theme-sanityinc-tomorrow color init-direnv init-snippets yasnippet-snippets yasnippet init-ledger init-dash init-folding init-misc init-slime init-lisp init-paredit init-nix init-terraform init-docker init-yaml init-toml init-sql init-python reformatter ansi-color init-http init-haml init-css init-html init-nxml init-org init-javascript init-erlang erlang-start init-csv init-markdown init-textile init-crontab init-compile init-projectile init-github init-git init-vc init-whitespace init-editing-utils repeat init-mmm mmm-auto mmm-vars mmm-utils mmm-compat init-sessions desktop frameset init-windows init-completion cape corfu init-embark init-minibuffer init-recentf init-flycheck init-ibuffer ibuf-macs init-uniquify init-grep init-isearch init-dired init-gui-frames ns-auto-titlebar init-osx-keys edmacro kmacro init-themes init-xterm init-frame-hooks init-exec-path exec-path-from-shell init-elpa fullframe use-package-ensure-system-package system-packages use-package use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode cl-extra help-mode use-package-ensure use-package-core finder-inf rx slime-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv init-site-lisp cl-seq init-utils init-benchmarking cl-loaddefs cl-lib derived early-init iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 1524406 530432) (symbols 48 81700 151) (strings 32 312418 63333) (string-bytes 1 12192584) (vectors 16 133974) (vector-slots 8 2581686 711833) (floats 8 1701 7648) (intervals 56 36559 8126) (buffers 992 93)) - Troy me@ntdef.com