From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Milan Zamazal Newsgroups: gmane.emacs.devel Subject: Re: Single process output reading Date: Tue, 17 Aug 2004 13:31:20 +0200 Organization: BRAILCOM, o.p.s. Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87wtzyuhkn.fsf@blackbird.zamazal.org> References: <874qn35tgf.fsf@zamazal.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092742327 7965 80.91.224.253 (17 Aug 2004 11:32:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2004 11:32:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 17 13:31:58 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bx2C6-0003Fp-00 for ; Tue, 17 Aug 2004 13:31:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bx2GF-0000vP-H0 for ged-emacs-devel@m.gmane.org; Tue, 17 Aug 2004 07:36:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bx2G8-0000vK-L2 for emacs-devel@gnu.org; Tue, 17 Aug 2004 07:36:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bx2G6-0000uv-Kg for emacs-devel@gnu.org; Tue, 17 Aug 2004 07:36:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bx2G6-0000uk-IR for emacs-devel@gnu.org; Tue, 17 Aug 2004 07:36:06 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bx2Bc-0001mP-HW for emacs-devel@gnu.org; Tue, 17 Aug 2004 07:31:28 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bx2Ba-0005lr-00 for ; Tue, 17 Aug 2004 13:31:26 +0200 Original-Received: from racek.programky.cz ([81.30.247.3]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Aug 2004 13:31:26 +0200 Original-Received: from pdm by racek.programky.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Aug 2004 13:31:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: racek.programky.cz X-Face: >kl&pL}(a*u\BCj7Q, \Yoq35~, 4dAu"CPGaJ[ahMli9uu#aF7dWxc3L.eaK2RWRU|', E+. -':&gJ-JAZ/N$f^4-3?G7M&Knna[A=lJ$}^!%@vuvulVl6-)x.V8RZ7fW9< User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:DOniiS2YmCGa9XMKjLeZ66kDZGc= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26279 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26279 >>>>> "KFS" == Kim F Storm writes: KFS> blocking everything including timers isn't very good, but may KFS> be acceptable for very short periods of time. Yes, that's what I need. KFS> Here's an (untested) patch that adds a "just-this-one" arg to KFS> accept-process-output Thanks! Unfortunately, when called as follows: (accept-process-output your-process nil nil 1) Emacs segfaults. FWIW, the traceback is #0 0x08186fa7 in wait_reading_process_input (time_limit=-1, microsecs=0, read_kbd=0, do_display=0) at process.c:4275 #1 0x08186574 in Faccept_process_output (process=148636188, timeout=0, timeout_msecs=138317841, just_this_one=8) at process.c:3781 #2 0x08154eb8 in Feval (form=138037816) at eval.c:2101 ... The problem is that wait_channel is -1 on the segfaulting line: FD_SET (wait_channel, &Available); I don't understand it, since wait_proc->infd is 72 (`pr' says 9) and the same call without the JUST-THIS-ONE argument (accept-process-output your-process nil nil nil) works fine. Regards, Milan Zamazal -- It is the reformer, who is anxious for the reform, and not society, from which he should expect nothing better than opposition, abhorrence and even mortal persecution. -- M. K. Gandhi