* bug#332: accept-process-output hangs (incompatibility) @ 2008-05-28 11:33 ` Ulrich Neumerkel 2008-05-29 14:07 ` Stefan Monnier 2008-05-29 17:05 ` bug#332: marked as done (accept-process-output hangs (incompatibility)) Emacs bug Tracking System 0 siblings, 2 replies; 5+ messages in thread From: Ulrich Neumerkel @ 2008-05-28 11:33 UTC (permalink / raw) To: bug-gnu-emacs --text follows this line-- Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Note: I reported that bug yesterday for an intermediary pre 22.2 version. The same problem occurs in 22.2 and is incompatible with previous versions: C-x C-e the following two expressions (progn (setq my-process (start-process "mine" "mine" "sleep" "1h")) (list-processes)) (accept-process-output my-process nil 400) We create a process mine, that sleeps for an hour. accept-process-output will hang, whereas it should return after 400 milliseconds. However, if argument SECONDS is replaced by 0 it will eval as expected. In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit) of 2008-05-28 on gupu.complang.tuwien.ac.at Windowing system distributor `The XFree86 Project, Inc', version 11.0.4003 configured using `configure '--without-toolkit-scroll-bars' '--prefix' '/opt/gupu' '--with-git=no'' 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: en_US locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: <help-echo> <help-echo> <help-echo> <down-mouse-1> <mouse-1> M-x C-g C-x C-f ~ / l f t <tab> e m <tab> a <tab> <tab> <tab> / <tab> <tab> e <tab> <return> <down> <down> C-x C-g <down> C-k <down> <down> <down> <down> <down> <down> <down> <down> <down> C-y C-a <up> <up> <up> <up> <up> <up> <up> <up> C-SPC <up> <up> <up> C-w C-k C-k C-k C-k C-x C-s <down> <down> <down> <down> C-x C-e C-w <down> C-x C-g C-/ <down> C-x C-e C-g <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report> Recent messages: Loading help-mode...done Making completion list... [2 times] Mark set [2 times] Wrote /home/ulrich/lftp/emacs/e19.el nil Undo! Quit [2 times] Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#332: accept-process-output hangs (incompatibility) 2008-05-28 11:33 ` bug#332: accept-process-output hangs (incompatibility) Ulrich Neumerkel @ 2008-05-29 14:07 ` Stefan Monnier 2008-05-29 14:18 ` Ulrich Neumerkel 2008-05-29 15:02 ` Ulrich Neumerkel 2008-05-29 17:05 ` bug#332: marked as done (accept-process-output hangs (incompatibility)) Emacs bug Tracking System 1 sibling, 2 replies; 5+ messages in thread From: Stefan Monnier @ 2008-05-29 14:07 UTC (permalink / raw) To: Ulrich Neumerkel; +Cc: bug-gnu-emacs, 332 > Note: I reported that bug yesterday for an intermediary pre 22.2 > version. The same problem occurs in 22.2 and is incompatible with > previous versions: Which previous versions accepted this form? The current behavior is in accordance with the docstring: Non-nil second arg seconds and third arg millisec are number of seconds and milliseconds to wait; return after that much time whether > We create a process mine, that sleeps for an hour. > accept-process-output will hang, whereas it should return after 400 > milliseconds. However, if argument SECONDS is replaced by 0 it will > eval as expected. BTW, I recommend you don't use the milliseconds argument at all. Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#332: accept-process-output hangs (incompatibility) 2008-05-29 14:07 ` Stefan Monnier @ 2008-05-29 14:18 ` Ulrich Neumerkel 2008-05-29 15:02 ` Ulrich Neumerkel 1 sibling, 0 replies; 5+ messages in thread From: Ulrich Neumerkel @ 2008-05-29 14:18 UTC (permalink / raw) To: monnier, ulrich; +Cc: bug-gnu-emacs, 332 > which previous versions accepted this form? GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit) of 2003-11-26 on gupu.complang.tuwien.ac.at GNU Emacs 21.2.50.2 (i686-pc-linux-gnu, X toolkit) of 2002-04-07 on gupu.complang.tuwien.ac.at GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit) of Fri Mar 16 2001 on porky.devel.redhat.com ... and definitely many more. I never had any such problem ever since xemacs (not the Lucid successor, but the first tentative X versions of the real Emacs ~ 1992). All *.50.1 versions habe probably been pulled from cvs-archives at that time. Best regards, Ulrich ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#332: accept-process-output hangs (incompatibility) 2008-05-29 14:07 ` Stefan Monnier 2008-05-29 14:18 ` Ulrich Neumerkel @ 2008-05-29 15:02 ` Ulrich Neumerkel 1 sibling, 0 replies; 5+ messages in thread From: Ulrich Neumerkel @ 2008-05-29 15:02 UTC (permalink / raw) To: monnier, ulrich; +Cc: bug-gnu-emacs, 332 One further remark concerning the docstring: in 20.7 it read more or less the same: Non-nil second arg TIMEOUT and third arg TIMEOUT-MSECS are number of seconds and microseconds to wait; return after that much time whether or not there is input. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#332: marked as done (accept-process-output hangs (incompatibility)) 2008-05-28 11:33 ` bug#332: accept-process-output hangs (incompatibility) Ulrich Neumerkel 2008-05-29 14:07 ` Stefan Monnier @ 2008-05-29 17:05 ` Emacs bug Tracking System 1 sibling, 0 replies; 5+ messages in thread From: Emacs bug Tracking System @ 2008-05-29 17:05 UTC (permalink / raw) To: Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 879 bytes --] Your message dated Thu, 29 May 2008 12:57:57 -0400 with message-id <jwvskw1aw2s.fsf-monnier+emacsbugreports@gnu.org> and subject line Re: bug#332: accept-process-output hangs (incompatibility) has caused the Emacs bug report #332, regarding accept-process-output hangs (incompatibility) to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 332: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=332 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 4595 bytes --] From: Ulrich Neumerkel <ulrich@complang.tuwien.ac.at> To: bug-gnu-emacs@gnu.org Subject: accept-process-output hangs (incompatibility) Date: Wed, 28 May 2008 13:33:01 +0200 Message-ID: <E1K1Jtt-000190-Vk@a4.complang.tuwien.ac.at> --text follows this line-- Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Note: I reported that bug yesterday for an intermediary pre 22.2 version. The same problem occurs in 22.2 and is incompatible with previous versions: C-x C-e the following two expressions (progn (setq my-process (start-process "mine" "mine" "sleep" "1h")) (list-processes)) (accept-process-output my-process nil 400) We create a process mine, that sleeps for an hour. accept-process-output will hang, whereas it should return after 400 milliseconds. However, if argument SECONDS is replaced by 0 it will eval as expected. In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit) of 2008-05-28 on gupu.complang.tuwien.ac.at Windowing system distributor `The XFree86 Project, Inc', version 11.0.4003 configured using `configure '--without-toolkit-scroll-bars' '--prefix' '/opt/gupu' '--with-git=no'' 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: en_US locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: <help-echo> <help-echo> <help-echo> <down-mouse-1> <mouse-1> M-x C-g C-x C-f ~ / l f t <tab> e m <tab> a <tab> <tab> <tab> / <tab> <tab> e <tab> <return> <down> <down> C-x C-g <down> C-k <down> <down> <down> <down> <down> <down> <down> <down> <down> C-y C-a <up> <up> <up> <up> <up> <up> <up> <up> C-SPC <up> <up> <up> C-w C-k C-k C-k C-k C-x C-s <down> <down> <down> <down> C-x C-e C-w <down> C-x C-g C-/ <down> C-x C-e C-g <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report> Recent messages: Loading help-mode...done Making completion list... [2 times] Mark set [2 times] Wrote /home/ulrich/lftp/emacs/e19.el nil Undo! Quit [2 times] Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done [-- Attachment #3: Type: message/rfc822, Size: 3219 bytes --] From: Stefan Monnier <monnier@iro.umontreal.ca> Cc: 332-close@emacsbugs.donarmstrong.com Subject: Re: bug#332: accept-process-output hangs (incompatibility) Date: Thu, 29 May 2008 12:57:57 -0400 Message-ID: <jwvskw1aw2s.fsf-monnier+emacsbugreports@gnu.org> >> which previous versions accepted this form? > GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit) of 2003-11-26 on gupu.complang.tuwien.ac.at > GNU Emacs 21.2.50.2 (i686-pc-linux-gnu, X toolkit) of 2002-04-07 on gupu.complang.tuwien.ac.at > GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit) of Fri Mar 16 2001 on porky.devel.redhat.com I've installed the patch below, which should fix your problem (note that the interpretation of the `millisec' argument has changed since Emacs-21 where it was a microseconds count). Stefan --- process.c.~1.542.~ 2008-05-22 17:12:27.000000000 -0400 +++ process.c 2008-05-29 12:52:17.000000000 -0400 @@ -3896,6 +3896,7 @@ seconds and milliseconds to wait; return after that much time whether or not there is input. If SECONDS is a floating point number, it specifies a fractional number of seconds to wait. +The MILLISEC argument is obsolete and should be avoided. If optional fourth arg JUST-THIS-ONE is non-nil, only accept output from PROCESS, suspending reading output from other processes. @@ -3911,6 +3912,18 @@ else just_this_one = Qnil; + if (!NILP (millisec)) + { /* Obsolete calling convention using integers rather than floats. */ + CHECK_NUMBER (millisec); + if (NILP (seconds)) + seconds = make_float (XINT (millisec) / 1000.0); + else + { + CHECK_NUMBER (seconds); + seconds = make_float (XINT (millisec) / 1000.0 + XINT (seconds)); + } + } + if (!NILP (seconds)) { if (INTEGERP (seconds)) @@ -3924,19 +3937,6 @@ else wrong_type_argument (Qnumberp, seconds); - if (INTEGERP (millisec)) - { - int carry; - usecs += XINT (millisec) * 1000; - carry = usecs / 1000000; - secs += carry; - if ((usecs -= carry * 1000000) < 0) - { - secs--; - usecs += 1000000; - } - } - if (secs < 0 || (secs == 0 && usecs == 0)) secs = -1, usecs = 0; } ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-29 17:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <jwvskw1aw2s.fsf-monnier+emacsbugreports@gnu.org> 2008-05-28 11:33 ` bug#332: accept-process-output hangs (incompatibility) Ulrich Neumerkel 2008-05-29 14:07 ` Stefan Monnier 2008-05-29 14:18 ` Ulrich Neumerkel 2008-05-29 15:02 ` Ulrich Neumerkel 2008-05-29 17:05 ` bug#332: marked as done (accept-process-output hangs (incompatibility)) Emacs bug Tracking System
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.