* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely @ 2010-08-01 16:19 Steve Purcell 2010-08-01 18:59 ` Óscar Fuentes 0 siblings, 1 reply; 7+ messages in thread From: Steve Purcell @ 2010-08-01 16:19 UTC (permalink / raw) To: 6771 I've been investigating an issue with magit in Emacs HEAD which isn't present in Emacs 23.x. Specifically, the git subprocesses it starts in order to pipe data to them do not exit as expected when magit calls process-send-eof. Further investigation shows that this misbehavior can be demonstrated by executing the following simple code in *scratch*: (let ((p (start-process "cat" (current-buffer) "cat"))) (process-send-eof p) (sit-for 1) (process-status p)) In Emacs 23, the result is 'exit, and "Process cat finished" is written into the buffer. In Emacs HEAD, however, the result is 'run, and "^D" is written into the buffer - obviously the process' input is not really being closed. This incorrect behavior happens regardless of the value of process-connection-type. More discussion of this issue in the context of magit is to be found here: http://github.com/philjackson/magit/issues/#issue/18 In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.4.0, NS apple-appkit-1038.32) of 2010-08-01 on mandala.home Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns' '--without-dbus' 'CFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: utf-8 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t paredit-mode: t show-paren-mode: t eldoc-mode: t diff-auto-refine-mode: t cua-mode: t desktop-save-mode: t global-auto-complete-mode: t auto-complete-mode: t ido-everywhere: t recentf-mode: t tooltip-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 unify-8859-on-decoding-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Undo! run [2 times] byte-code: End of buffer [2 times] Killed line Saving file /Users/steve/Desktop/foo... Wrote /Users/steve/Desktop/foo help-setup-xref: Symbol's value as variable is void: help-xref-following Auto-saving...done t Auto-saving...done Load-path shadows: /Users/steve/.emacs.d/elpa/json-1.2/json hides /Applications/Emacs24.app/Contents/Resources/lisp/json /Users/steve/.emacs.d/custom hides /Applications/Emacs24.app/Contents/Resources/lisp/custom /Users/steve/.emacs.d/site-lisp/rinari/util/jump/which-func hides /Applications/Emacs24.app/Contents/Resources/lisp/progmodes/which-func /Users/steve/.emacs.d/site-lisp/rinari/util/ruby-mode hides /Applications/Emacs24.app/Contents/Resources/lisp/progmodes/ruby-mode ~/.emacs.d/site-lisp/org-mode/lisp/org hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org ~/.emacs.d/site-lisp/org-mode/lisp/org-xoxo hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-xoxo ~/.emacs.d/site-lisp/org-mode/lisp/org-wl hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-wl ~/.emacs.d/site-lisp/org-mode/lisp/org-w3m hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-w3m ~/.emacs.d/site-lisp/org-mode/lisp/org-vm hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-vm ~/.emacs.d/site-lisp/org-mode/lisp/org-timer hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-timer ~/.emacs.d/site-lisp/org-mode/lisp/org-taskjuggler hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-taskjuggler ~/.emacs.d/site-lisp/org-mode/lisp/org-table hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-table ~/.emacs.d/site-lisp/org-mode/lisp/org-src hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-src ~/.emacs.d/site-lisp/org-mode/lisp/org-rmail hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-rmail ~/.emacs.d/site-lisp/org-mode/lisp/org-remember hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-remember ~/.emacs.d/site-lisp/org-mode/lisp/org-publish hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-publish ~/.emacs.d/site-lisp/org-mode/lisp/org-protocol hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-protocol ~/.emacs.d/site-lisp/org-mode/lisp/org-plot hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-plot ~/.emacs.d/site-lisp/org-mode/lisp/org-mouse hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mouse ~/.emacs.d/site-lisp/org-mode/lisp/org-mobile hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mobile ~/.emacs.d/site-lisp/org-mode/lisp/org-mks hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mks ~/.emacs.d/site-lisp/org-mode/lisp/org-mhe hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mhe ~/.emacs.d/site-lisp/org-mode/lisp/org-mew hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mew ~/.emacs.d/site-lisp/org-mode/lisp/org-macs hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-macs ~/.emacs.d/site-lisp/org-mode/lisp/org-mac-message hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-mac-message ~/.emacs.d/site-lisp/org-mode/lisp/org-list hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-list ~/.emacs.d/site-lisp/org-mode/lisp/org-latex hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-latex ~/.emacs.d/site-lisp/org-mode/lisp/org-jsinfo hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-jsinfo ~/.emacs.d/site-lisp/org-mode/lisp/org-irc hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-irc ~/.emacs.d/site-lisp/org-mode/lisp/org-install hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-install ~/.emacs.d/site-lisp/org-mode/lisp/org-inlinetask hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-inlinetask ~/.emacs.d/site-lisp/org-mode/lisp/org-info hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-info ~/.emacs.d/site-lisp/org-mode/lisp/org-indent hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-indent ~/.emacs.d/site-lisp/org-mode/lisp/org-id hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-id ~/.emacs.d/site-lisp/org-mode/lisp/org-icalendar hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-icalendar ~/.emacs.d/site-lisp/org-mode/lisp/org-html hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-html ~/.emacs.d/site-lisp/org-mode/lisp/org-habit hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-habit ~/.emacs.d/site-lisp/org-mode/lisp/org-gnus hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-gnus ~/.emacs.d/site-lisp/org-mode/lisp/org-freemind hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-freemind ~/.emacs.d/site-lisp/org-mode/lisp/org-footnote hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-footnote ~/.emacs.d/site-lisp/org-mode/lisp/org-feed hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-feed ~/.emacs.d/site-lisp/org-mode/lisp/org-faces hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-faces ~/.emacs.d/site-lisp/org-mode/lisp/org-exp hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-exp ~/.emacs.d/site-lisp/org-mode/lisp/org-exp-blocks hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-exp-blocks ~/.emacs.d/site-lisp/org-mode/lisp/org-entities hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-entities ~/.emacs.d/site-lisp/org-mode/lisp/org-docview hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-docview ~/.emacs.d/site-lisp/org-mode/lisp/org-docbook hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-docbook ~/.emacs.d/site-lisp/org-mode/lisp/org-datetree hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-datetree ~/.emacs.d/site-lisp/org-mode/lisp/org-ctags hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-ctags ~/.emacs.d/site-lisp/org-mode/lisp/org-crypt hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-crypt ~/.emacs.d/site-lisp/org-mode/lisp/org-compat hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-compat ~/.emacs.d/site-lisp/org-mode/lisp/org-colview hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-colview ~/.emacs.d/site-lisp/org-mode/lisp/org-clock hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-clock ~/.emacs.d/site-lisp/org-mode/lisp/org-capture hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-capture ~/.emacs.d/site-lisp/org-mode/lisp/org-bibtex hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-bibtex ~/.emacs.d/site-lisp/org-mode/lisp/org-beamer hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-beamer ~/.emacs.d/site-lisp/org-mode/lisp/org-bbdb hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-bbdb ~/.emacs.d/site-lisp/org-mode/lisp/org-attach hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-attach ~/.emacs.d/site-lisp/org-mode/lisp/org-ascii hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-ascii ~/.emacs.d/site-lisp/org-mode/lisp/org-archive hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-archive ~/.emacs.d/site-lisp/org-mode/lisp/org-agenda hides /Applications/Emacs24.app/Contents/Resources/lisp/org/org-agenda ~/.emacs.d/site-lisp/org-mode/lisp/ob hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob ~/.emacs.d/site-lisp/org-mode/lisp/ob-tangle hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-tangle ~/.emacs.d/site-lisp/org-mode/lisp/ob-table hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-table ~/.emacs.d/site-lisp/org-mode/lisp/ob-sqlite hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-sqlite ~/.emacs.d/site-lisp/org-mode/lisp/ob-sql hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-sql ~/.emacs.d/site-lisp/org-mode/lisp/ob-sh hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-sh ~/.emacs.d/site-lisp/org-mode/lisp/ob-screen hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-screen ~/.emacs.d/site-lisp/org-mode/lisp/ob-sass hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-sass ~/.emacs.d/site-lisp/org-mode/lisp/ob-ruby hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-ruby ~/.emacs.d/site-lisp/org-mode/lisp/ob-ref hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-ref ~/.emacs.d/site-lisp/org-mode/lisp/ob-R hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-R ~/.emacs.d/site-lisp/org-mode/lisp/ob-python hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-python ~/.emacs.d/site-lisp/org-mode/lisp/ob-perl hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-perl ~/.emacs.d/site-lisp/org-mode/lisp/ob-octave hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-octave ~/.emacs.d/site-lisp/org-mode/lisp/ob-ocaml hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-ocaml ~/.emacs.d/site-lisp/org-mode/lisp/ob-mscgen hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-mscgen ~/.emacs.d/site-lisp/org-mode/lisp/ob-matlab hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-matlab ~/.emacs.d/site-lisp/org-mode/lisp/ob-lob hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-lob ~/.emacs.d/site-lisp/org-mode/lisp/ob-latex hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-latex ~/.emacs.d/site-lisp/org-mode/lisp/ob-keys hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-keys ~/.emacs.d/site-lisp/org-mode/lisp/ob-haskell hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-haskell ~/.emacs.d/site-lisp/org-mode/lisp/ob-gnuplot hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-gnuplot ~/.emacs.d/site-lisp/org-mode/lisp/ob-exp hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-exp ~/.emacs.d/site-lisp/org-mode/lisp/ob-eval hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-eval ~/.emacs.d/site-lisp/org-mode/lisp/ob-emacs-lisp hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-emacs-lisp ~/.emacs.d/site-lisp/org-mode/lisp/ob-dot hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-dot ~/.emacs.d/site-lisp/org-mode/lisp/ob-ditaa hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-ditaa ~/.emacs.d/site-lisp/org-mode/lisp/ob-css hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-css ~/.emacs.d/site-lisp/org-mode/lisp/ob-comint hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-comint ~/.emacs.d/site-lisp/org-mode/lisp/ob-clojure hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-clojure ~/.emacs.d/site-lisp/org-mode/lisp/ob-C hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-C ~/.emacs.d/site-lisp/org-mode/lisp/ob-asymptote hides /Applications/Emacs24.app/Contents/Resources/lisp/org/ob-asymptote /Users/steve/.emacs.d/site-lisp/nxml-mode/xsd-regexp hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/xsd-regexp /Users/steve/.emacs.d/site-lisp/nxml-mode/xmltok hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/xmltok /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-xsd hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-xsd /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-valid hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-valid /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-util hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-util /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-uri hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-uri /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-pttrn hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-pttrn /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-parse hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-parse /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-nxml hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-nxml /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-match hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-match /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-maint hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-maint /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-loc hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-loc /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-dt hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-dt /Users/steve/.emacs.d/site-lisp/nxml-mode/rng-cmpct hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/rng-cmpct /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-util hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-util /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-uchnm hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-uchnm /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-rap hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-rap /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-parse hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-parse /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-outln hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-outln /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-ns hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-ns /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-mode hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-mode /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-maint hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-maint /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-glyph hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-glyph /Users/steve/.emacs.d/site-lisp/nxml-mode/nxml-enc hides /Applications/Emacs24.app/Contents/Resources/lisp/nxml/nxml-enc /Applications/Emacs24.app/Contents/Resources/lisp/emacs-lisp/package hides /Users/steve/.emacs.d/site-lisp/package/package /Users/steve/.emacs.d/init hides /Users/steve/.emacs.d/site-lisp/rinari/test/init /Users/steve/.emacs.d/init hides /Users/steve/.emacs.d/site-lisp/rinari/util/jump/test/init /Users/steve/.emacs.d/site-lisp/rinari/test/elunit hides /Users/steve/.emacs.d/site-lisp/rinari/util/jump/test/elunit Features: (shadow sort mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev mail-utils gmm-utils mailheader emacsbug executable vc-dispatcher debug mule-util tabify help-mode cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs multi-isearch vc-darcs goto-addr project-local-variables view tramp-imap assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell password-cache format-spec tramp-compat trampver paredit init-locales init-edit-server edit-server init-misc paren init-twitter twit url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw xml init-common-lisp init-clojure init-slime slime-autoloads init-lisp init-rails rinari jump inflections findr init-ruby-mode ruby-compilation which-func inf-ruby ruby-mode ansi-color rcodetools flymake-ruby init-ocaml init-haskell hoogle cabal-mode tempo init-python-mode flymake-python init-haml flymake-haml init-css hexl eldoc init-nxml nxml-enc init-htmlize init-org init-php init-sh init-javascript js-comint init-erlang erlang-start init-csv init-markdown init-textile init-crontab init-gnuplot init-git magithub json url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse auth-source gnus-util timezone url-vars mm-util mail-prsvr mailcap rebase-mode magit ediff server derived pcomplete diff-mode log-edit pcvs-util add-log vc-git init-darcs init-svn init-editing-utils eol-conversion cua-base all delsel init-growl todochiku growl init-mmm mmm-auto mmm-vars mmm-compat init-themes color-theme-sanityinc cus-edit cus-start cus-load color-theme sendmail reporter color-theme-autoloads init-fonts init-sessions session desktop init-windows windmove winner init-auto-complete auto-complete-config auto-complete easy-mmode popup init-hippie-expand init-anything anything-config warnings compile comint ring browse-url semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw semantic/loaddefs eieio byte-opt bytecomp byte-compile mode-local cedet imenu bookmark pp rx ffap thingatpt anything init-ido smex ido init-recentf recentf tree-widget wid-edit init-regex-tool init-flymake init-ibuffer ibuffer init-uniquify uniquify init-iedit init-isearch init-viper init-dired dired+ dired-x ediff-merg ediff-diff ediff-wind ediff-mult ediff-help ediff-init ediff-util dired-aux dired regexp-opt init-proxies init-gui-frames init-maxframe maxframe init-osx-keys edmacro kmacro init-title-bar init-xterm init-frame-hooks init-exec-path init-utils find-func init-elpa fringe-helper-autoloads gist-autoloads highlight-parentheses-autoloads highlight-symbol-autoloads lua-mode-autoloads project-local-variables-autoloads advice help-fns advice-preload sass-mode-autoloads haml-mode-autoloads yaml-mode-autoloads package cl cl-19 tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-08-01 16:19 bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely Steve Purcell @ 2010-08-01 18:59 ` Óscar Fuentes 2010-08-02 7:06 ` Jan Djärv 0 siblings, 1 reply; 7+ messages in thread From: Óscar Fuentes @ 2010-08-01 18:59 UTC (permalink / raw) To: Steve Purcell; +Cc: 6771 This problem also affects eshell: cat foo | wc hangs. As pointed out on the magit bug tracker, the problem was introduced by this commit: http://repo.or.cz/w/emacs.git/commitdiff/ee1b6e21aa2b831499659b7f58ec94b95016cec7 2010-06-01 Stefan Monnier <monnier@iro.umontreal.ca> * sysdep.c (child_setup_tty): Move the non-canonical initialization to the HAVE_TERMIO where it belongs (bug#6149). Reverting it fixes magit and eshell. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-08-01 18:59 ` Óscar Fuentes @ 2010-08-02 7:06 ` Jan Djärv 2010-08-02 14:37 ` Óscar Fuentes 2010-12-08 19:18 ` Wolfgang Jenkner 0 siblings, 2 replies; 7+ messages in thread From: Jan Djärv @ 2010-08-02 7:06 UTC (permalink / raw) To: Óscar Fuentes; +Cc: Steve Purcell, 6771-done I enabled ICANON. If there is a long line problem (i.e. a too long line to send_process may only send a partial line), please write a bug report for it with a way to reproduce it. That way we can fix it. I have not seen any problem or been able to reproduce the long line problem. Jan D. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-08-02 7:06 ` Jan Djärv @ 2010-08-02 14:37 ` Óscar Fuentes 2010-08-02 18:27 ` Jan Djärv 2010-12-08 19:18 ` Wolfgang Jenkner 1 sibling, 1 reply; 7+ messages in thread From: Óscar Fuentes @ 2010-08-02 14:37 UTC (permalink / raw) To: 6771 Jan Djärv <jan.h.d@swipnet.se> writes: > I enabled ICANON. If there is a long line problem (i.e. a too long > line to send_process may only send a partial line), please write a bug > report for it with a way to reproduce it. That way we can fix it. I > have not seen any problem or been able to reproduce the long line > problem. So the example command line on the attachment of bug#6149 does not reproduce the problem? ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-08-02 14:37 ` Óscar Fuentes @ 2010-08-02 18:27 ` Jan Djärv 0 siblings, 0 replies; 7+ messages in thread From: Jan Djärv @ 2010-08-02 18:27 UTC (permalink / raw) To: Óscar Fuentes; +Cc: 6771 Óscar Fuentes skrev 2010-08-02 16.37: > Jan Djärv<jan.h.d@swipnet.se> writes: > >> I enabled ICANON. If there is a long line problem (i.e. a too long >> line to send_process may only send a partial line), please write a bug >> report for it with a way to reproduce it. That way we can fix it. I >> have not seen any problem or been able to reproduce the long line >> problem. > > So the example command line on the attachment of bug#6149 does not > reproduce the problem? No: % echo ... | wc 1 154 4881 Jan D. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-08-02 7:06 ` Jan Djärv 2010-08-02 14:37 ` Óscar Fuentes @ 2010-12-08 19:18 ` Wolfgang Jenkner 2010-12-10 0:18 ` Štěpán Němec 1 sibling, 1 reply; 7+ messages in thread From: Wolfgang Jenkner @ 2010-12-08 19:18 UTC (permalink / raw) To: 6771 Jan Djärv <jan.h.d@swipnet.se> writes: > I enabled ICANON. If there is a long line problem (i.e. a too long > line to send_process may only send a partial line), please write a bug > report for it with a way to reproduce it. That way we can fix it. I > have not seen any problem or been able to reproduce the long line > problem. FWIW, such a problem does exist in the wild. The UIM emacs bridge (see [1]) sometimes sends long lines of about 20k of ASCII characters to the uim-el-helper-agent subprocess. Now, on FreeBSD 8-STABLE the maximum total size of a tty (or pty) input queue is 1920 bytes, cf. tty_watermarks() in [2] and the discussion in [3]. For Linux, judging from a superficial glance at tty_buffer_alloc() in [4], the bound seems to be a more comfortable 65536 bytes. For a self-contained example of what happens on breaking this bound, evaluate the following form (adjust 1923 to taste) and observe that the process output buffer contains only ASCII BEL (\C-g) characters, which is (modulo bogus references to MAX_INPUT and MAX_CANON) what termios(4) documents (search for IMAXBEL), i.e., the pseudo-terminal rings :-) (let* ((buf (generate-new-buffer "cat-out")) (proc (start-process "cat" buf "cat"))) (process-send-string proc (make-string 1923 ?x)) (process-send-string proc "\n") (pop-to-buffer buf)) Of course, if line discipline features are not needed, a pipe can be used as a work-around (and I intend to submit a patch in this sense to the UIM developers or else to the FreeBSD port maintainer, which is one reason why I wanted to have this issue documented here). [1] http://code.google.com/p/uim/wiki/UIM_EL [2] http://svn.freebsd.org/viewvc/base/stable/8/sys/kern/tty.c?view=markup [3] http://lists.freebsd.org/pipermail/freebsd-stable/2009-October/052318.html [3] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/tty/tty_buffer.c;hb=HEAD ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely 2010-12-08 19:18 ` Wolfgang Jenkner @ 2010-12-10 0:18 ` Štěpán Němec 0 siblings, 0 replies; 7+ messages in thread From: Štěpán Němec @ 2010-12-10 0:18 UTC (permalink / raw) To: Wolfgang Jenkner; +Cc: 6771 Wolfgang Jenkner <wjenkner@inode.at> writes: > Jan Djärv <jan.h.d@swipnet.se> writes: > >> I enabled ICANON. If there is a long line problem (i.e. a too long >> line to send_process may only send a partial line), please write a bug >> report for it with a way to reproduce it. That way we can fix it. I >> have not seen any problem or been able to reproduce the long line >> problem. > > FWIW, such a problem does exist in the wild. > > The UIM emacs bridge (see [1]) sometimes sends long lines of about 20k > of ASCII characters to the uim-el-helper-agent subprocess. > > Now, on FreeBSD 8-STABLE the maximum total size of a tty (or pty) input > queue is 1920 bytes, cf. tty_watermarks() in [2] and the discussion in > [3]. For Linux, judging from a superficial glance at tty_buffer_alloc() > in [4], the bound seems to be a more comfortable 65536 bytes. > > For a self-contained example of what happens on breaking this bound, > evaluate the following form (adjust 1923 to taste) and observe that the > process output buffer contains only ASCII BEL (\C-g) characters, which > is (modulo bogus references to MAX_INPUT and MAX_CANON) what termios(4) > documents (search for IMAXBEL), i.e., the pseudo-terminal rings :-) > > (let* ((buf (generate-new-buffer "cat-out")) > (proc (start-process "cat" buf "cat"))) > (process-send-string proc (make-string 1923 ?x)) > (process-send-string proc "\n") > (pop-to-buffer buf)) > > Of course, if line discipline features are not needed, a pipe can be > used as a work-around (and I intend to submit a patch in this sense to > the UIM developers or else to the FreeBSD port maintainer, which is one > reason why I wanted to have this issue documented here). Although it would certainly be nice if this limitation disappeared, using pipes instead is not necessarily a work-around -- it might simply be the better solution for what you are doing, for other reasons as well. As the Elisp manual puts it (info "(elisp)Asynchronous Processes"): -- Variable: process-connection-type This variable controls the type of device used to communicate with asynchronous subprocesses. If it is non-`nil', then PTYs are used, when available. Otherwise, pipes are used. PTYs are usually preferable for processes visible to the user, as in Shell mode, because they allow job control (`C-c', `C-z', etc.) to work between the process and its children, whereas pipes do not. For subprocesses used for internal purposes by programs, it is often better to use a pipe, because they are more efficient. In addition, the total number of PTYs is limited on many systems and it is good not to waste them. Štěpán ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-10 0:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-01 16:19 bug#6771: 24.0.50; Child process input isn't closed by process-send-eof; hangs indefinitely Steve Purcell 2010-08-01 18:59 ` Óscar Fuentes 2010-08-02 7:06 ` Jan Djärv 2010-08-02 14:37 ` Óscar Fuentes 2010-08-02 18:27 ` Jan Djärv 2010-12-08 19:18 ` Wolfgang Jenkner 2010-12-10 0:18 ` Štěpán Němec
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).