From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: emacs | Pipeline #8399 has failed for master | ee0e259e Date: Sun, 17 Jan 2021 14:21:20 +0100 Message-ID: References: <5feaf98365b55_3f903d428113941@emba.gnu.org.mail> <87o8ica9xp.fsf@gmx.de> <87pn2s35a2.fsf@gmail.com> <87ft3oa4pz.fsf@gmx.de> <8735zo9ui7.fsf@gmx.de> <87h7nw39gg.fsf@gmail.com> <87im8b3jo6.fsf@gmx.de> <87lfd6cld0.fsf@gmx.de> <87h7nf4twj.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39051"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 17 14:22:20 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l180a-000A4T-2A for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Jan 2021 14:22:20 +0100 Original-Received: from localhost ([::1]:60652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l180Z-0007aX-3Q for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Jan 2021 08:22:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l17zs-0007Bq-Ji for emacs-devel@gnu.org; Sun, 17 Jan 2021 08:21:36 -0500 Original-Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:38731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l17zp-0004Vn-If for emacs-devel@gnu.org; Sun, 17 Jan 2021 08:21:36 -0500 Original-Received: by mail-ot1-x332.google.com with SMTP id 34so2760460otd.5 for ; Sun, 17 Jan 2021 05:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9A1tssF1FBAzeIHTuVYSJC9uYw8671wdgn4eJIh98nE=; b=mOzZhHSjQx6rJHlIDy/TGTH5wALyPg+9V8U8M7d79KK/KkbpA7aVPbOdJFAoRhciSF SqPWEjIirUrvvIg7qFdUQWW0JdLTL/L5tk2CcPndA6N9K/sNV99MX9ig5pRvyTfwSvu3 hNhha0gj1u3GwJFkFTDsbTfsIPLuA9NcXqQfsgsO1NIwJSCNsVpGPkdz56r+G2ep6f4L fL8rembzD29jOCCc1/LTLYx7fb36gUWFfE+d+6lT2gAOmPMNG3q7IpPMLI0XXh+OV1qx DmRwEvN9bQGSHOEZgKm6T82ZGDle9BiHDioha7Uem3AARPhjega8QKMWV4NjCzH4U8Kq 6Wtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9A1tssF1FBAzeIHTuVYSJC9uYw8671wdgn4eJIh98nE=; b=E6T9d3oybffwL2nULjE5QqbIRSjl/tsBaq0upotRRNuHp58graAdpdnBsMwqLRxMmL pAL/L94rlCHzAmYbTaImC3XPg2Shbg/rH2MkTz0BFwJljNzjpszH6OfBEFVwqBxUOO9M Rb0vxRJl8LJZTEPNCQhRIzNa+hQldfbrj+q06LmzR8/bcW+Co0m6uazvNtSEpo7yU5S5 +nZVA6daakjgxR5LaqKdWElfCpZj8f5R+FNWCCLzPsz5cTcRHNEa99HnAbW5xytnouNd kxGmU3DE+V4P1ybzZz6/NnxSEv9KAY5Px7vnFHaYFr2rnkds6toVXaLRipLPJyjQsLhA YxiQ== X-Gm-Message-State: AOAM53372dVYbQAKmwB7zh5mFqvbRd+m2yswSCe8g/55V1Tq/DmM6e/l E279YjcvGzPDR/LfnS7g+UsovnzaMLcPlqH1WZ4= X-Google-Smtp-Source: ABdhPJyNWUw5pkXRus1tXTDcISKr9o4yDAhoByRmHHTcCzouxieslhd4VlrHALnrHnnJlZd1d7SHDTgrj5bejREjk6E= X-Received: by 2002:a9d:602:: with SMTP id 2mr14324121otn.153.1610889691971; Sun, 17 Jan 2021 05:21:31 -0800 (PST) In-Reply-To: <87h7nf4twj.fsf@gmx.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263119 Archived-At: Am So., 17. Jan. 2021 um 13:42 Uhr schrieb Michael Albinus : > > Philipp Stephani writes: > > Hi Philipp, > > > You're right in that (while (accept-process-output PROC 0)) doesn't > > result in a busy wait, yes. However, since accept-process-output > > returns nil in that case, it wouldn't wait at all. But these tests > > (e.g. process-tests-stderr-filter) are clearly intended to wait for > > process exit; they even contain assertions that the process has > > exited. > > I'm still convinced that (while (accept-process-output PROC)) is the > > only correct way to wait for PROC to finish (see the "Accepting > > Output" Info node). > > I believe, (while (accept-process-output PROC 0)) is the proper way to > read pending output from an exited process. That's all. Yeah, I think you're right. However, if we'd need to wait for the process anyway, we'd need to evaluate (while (process-live-p PROC) (accept-process-output)) (while (accept-process-output PROC 0)) and that's more complex and subtler than (while (accept-process-output PROC)). There's another issue that I haven't had the chance to debug yet: If you evaluate a form like (let ((tot-calls 0)) (dotimes (i 100) (let* ((calls 0) (a (make-process :name "a" :command (list "bash" "-c" "echo out && echo err >&2") :stderr (generate-new-buffer "*stderr*") :sentinel (lambda (_a _b) (cl-incf calls)) :noquery t))) (while (accept-process-output a)) (cl-incf tot-calls calls))) tot-calls) then the result will often be significantly less than 100, and I think Emacs should guarantee that it will be exactly 100 (i.e. that the sentinel is guaranteed to be called once accept-process-output returns nil).