From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58218: 29.0.50; url-retrieve-synchronously with timeout causes process-query-on-exit Date: Sat, 01 Oct 2022 14:44:43 +0300 Message-ID: <83mtafbwes.fsf@gnu.org> References: <4c994c0583c54ff61c98cb54abfd60d7@webmail.orcon.net.nz> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31750"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58218@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 01 13:46:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oeawd-00083c-CY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 13:46:11 +0200 Original-Received: from localhost ([::1]:38032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeawb-0006Jz-Jk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 07:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeawU-0006Jl-Bd for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 07:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeawU-0006tE-3P for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 07:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeawT-0008Tu-NC for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2022 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58218 X-GNU-PR-Package: emacs Original-Received: via spool by 58218-submit@debbugs.gnu.org id=B58218.166462470432529 (code B ref 58218); Sat, 01 Oct 2022 11:46:01 +0000 Original-Received: (at 58218) by debbugs.gnu.org; 1 Oct 2022 11:45:04 +0000 Original-Received: from localhost ([127.0.0.1]:43818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeavX-0008Sb-VS for submit@debbugs.gnu.org; Sat, 01 Oct 2022 07:45:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeavV-0008Ro-Af for 58218@debbugs.gnu.org; Sat, 01 Oct 2022 07:45:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeavP-0006ZQ-OD; Sat, 01 Oct 2022 07:44:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qfHzviziuohqNHxGpBeYm+vVODDnqsMounFF4ygQ6Zs=; b=MNG1XxrDlwzw buhJB/4xEYEZWfuSqvZBjjr/w85d3nA1J/CxxhraSQhGO1uo3v4SRXrEGbAS9ucpOr6wZUQJeT/Xx V+UvEkUQ/vJsrfy7+4B+/SfZGKuAqje0I2zh/qcDzV82XFamfX34aISmA0AD3x88h1ncVFpIN3dFk mRYxWa8YB9+7CfHJ5ZyjzSHrGGvDx0UsLflTgIiTpZNCnMDMR9RlXwNkGdeYtZ4G+CVVJfOKzEH28 ROXIN0WgBWxHAUjdbt/pFMDm/1dThAhwZDxC/wHaxcEZBHIatvClBtnNxkGoup7EVgw/UpI0md3CB Bcn4PbGOS48vpupV3+O7xA==; Original-Received: from [87.69.77.57] (port=4400 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeavP-0005jm-7I; Sat, 01 Oct 2022 07:44:55 -0400 In-Reply-To: <4c994c0583c54ff61c98cb54abfd60d7@webmail.orcon.net.nz> (message from Phil Sainty on Sat, 01 Oct 2022 23:55:05 +1300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244109 Archived-At: > Date: Sat, 01 Oct 2022 23:55:05 +1300 > From: Phil Sainty > > If you use the TIMEOUT argument to `url-retrieve-synchronously' and the > response is not obtained within that duration, then the process created > for that request causes query-on-exit behaviour. I can reproduce this > in all the Emacs builds I have, including this 29.0.50 build. > > > ;; With a short timeout causing the request to be aborted: > > (url-retrieve-synchronously "http://www.example.com" nil nil 0.01) > nil > > M-x list-processes > www.example.com -- open -- -- Main (network connection to > www.example.com:80) > > C-x C-c > Active processes exist; kill them and exit anyway? (yes or no) > > > > ;; With a long timeout (or a nil timeout): > > (url-retrieve-synchronously "http://www.example.com" nil nil 5) > # > > M-x list-processes > www.example.com -- open -- -- Main (network connection to > www.example.com:80) > > C-x C-c > exits without any process-related prompt > > > > I'm not sure why the network connection remains open in either case, but > regardless of that it seems as if process-query-on-exit-flag is set if > the request times out, and cleared if it does not. The query-on-exit > case seems to me like a bug, especially when there is no obvious way to > obtain the process object and change the flag. Maybe I'm missing something, but if url-retrieve-synchronously exits with a timeout, isn't it expected that the process be still alive, and therefore that Emacs will ask you about killing it? Or are you saying that when url-retrieve-synchronously exits due to timeout, it should kill the process?