From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matthias Dahl Newsgroups: gmane.emacs.devel Subject: Re: wait_reading_process_ouput hangs in certain cases (w/ patches) Date: Fri, 10 Nov 2017 15:53:10 +0100 Message-ID: <0baebcd3-d423-f6a1-321b-c3497ceabd96@binary-island.eu> References: <83lgjz8eiy.fsf@gnu.org> <831slp98ut.fsf@gnu.org> <83tvyj62qg.fsf@gnu.org> <83r2tetf90.fsf@gnu.org> <5150d198-8dd3-9cf4-5914-b7e945294452@binary-island.eu> <83tvy7s6wi.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1510325632 29502 195.159.176.226 (10 Nov 2017 14:53:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Nov 2017 14:53:52 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 10 15:53:47 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDAgk-0007J9-Uw for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 15:53:47 +0100 Original-Received: from localhost ([::1]:42124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDAgq-0002Xd-Om for ged-emacs-devel@m.gmane.org; Fri, 10 Nov 2017 09:53:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDAgH-0002XT-P1 for emacs-devel@gnu.org; Fri, 10 Nov 2017 09:53:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDAgE-0005xX-Jf for emacs-devel@gnu.org; Fri, 10 Nov 2017 09:53:17 -0500 Original-Received: from ud19.udmedia.de ([194.117.254.59]:55412 helo=mail.ud19.udmedia.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eDAgE-0005uR-7A for emacs-devel@gnu.org; Fri, 10 Nov 2017 09:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=binary-island.eu; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=k1; bh=BX zjY0DD0XC3TGhnI14+0b4jwuQHGaBl2/asY9rL3Mc=; b=qb1bRBySvOhKmqFw/T YytpvtbBIBQF17TsTbl5E1Q0HJ4LUMxX59T2IZlNDKEJCCBiMSte4Rz88PFN8d+4 Mx5sOkipQPgLiWsDTsaEkQ96WVfPuCmeLDht+GpthrCmB5Ero41HoHg/7AdjczvX pv66HHWYP1wJD38i4wB+tpJ3Q= Original-Received: (qmail 4920 invoked from network); 10 Nov 2017 15:53:11 +0100 Original-Received: from unknown (HELO ?IPv6:2a02:810b:c540:234:36aa:25b9:ca8f:d05f?) (ud19?126p1@2a02:810b:c540:234:36aa:25b9:ca8f:d05f) by mail.ud19.udmedia.de with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256 encrypted, authenticated); 10 Nov 2017 15:53:11 +0100 Openpgp: id=1E87ADA02EFE759EFC20B2D1042F47D273AA780C In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 194.117.254.59 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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 Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220027 Archived-At: Hello Stefan... On 07/11/17 18:23, Stefan Monnier wrote: > BTW, we could count the number of (non-empty) "chunks" rather than the > number of bytes. Thanks for the suggestion. In this case, I think just counting the bytes keeps things simple and makes this value easier to understand when doing a debugging session that benefits from this information. Also, counting the chunks wouldn't really improve the situation much, if I am not mistaken? It would just take a bit longer for a wrap-around to happen. > >> { >> got_some_output = 1; >> break; >> } > > Please try to use `true' and `false' for boolean values (there's still > a lot of code in src/*.c which uses 0 and 1, admittedly, but this should > slowly disappear over time). That is actually legacy code right there. I did not introduce that variable nor is it a boolean. Actually it is a integer in disguise that stores how many bytes have been read. ;-) It is very unfortunate naming, I agree. The revised patches don't set it to 1 but do calculate the proper value, so this is a non-issue now. Thanks for taking the time and have a nice weekend, Matthias -- Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu