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#56002: src/process.c; make-process fails to clean up stderr process on early exit Date: Thu, 16 Jun 2022 08:13:31 +0300 Message-ID: <83pmj9qjgk.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9603"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56002@debbugs.gnu.org To: Tom Gillespie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 16 07:16:01 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 1o1hrM-0002IK-Cb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 07:16:00 +0200 Original-Received: from localhost ([::1]:52986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1hrD-0001lW-4b for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 01:15:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1hpU-0001kE-0C for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 01:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46527) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1hpR-0008Mp-OF for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 01:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1hpR-0001kz-HQ for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 01:14: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: Thu, 16 Jun 2022 05:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56002 X-GNU-PR-Package: emacs Original-Received: via spool by 56002-submit@debbugs.gnu.org id=B56002.16553564286727 (code B ref 56002); Thu, 16 Jun 2022 05:14:01 +0000 Original-Received: (at 56002) by debbugs.gnu.org; 16 Jun 2022 05:13:48 +0000 Original-Received: from localhost ([127.0.0.1]:40424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1hpD-0001kR-W9 for submit@debbugs.gnu.org; Thu, 16 Jun 2022 01:13:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1hpB-0001kB-2E for 56002@debbugs.gnu.org; Thu, 16 Jun 2022 01:13:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1hp5-0008Kj-P7; Thu, 16 Jun 2022 01:13:39 -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=Lqe9UaQXsrMypC8zWwn4572/wa2eFuOxk1c6vOrf0+8=; b=dmW1BZ2CXxZq 1tCHY5dNiOBh6FA/G8jDna5KOL4rZVpg+x5Q/psCM64sZCrEa9m/LHyEC9qMykjBcyeJWZO7JrG+O 1f4Q/c7kaS4myFfJIM8cx1bK8fQfW0S5rKr1Yr7OdcOBUo80P6B5bOIDAcmiAwqruXgspOPtr8n17 d7VcUwHdnjutEMzSoGydAnDck3TRNx6LDZFeHH75OLrNEmRq5M+NVCogR7LwBRS3+dzPLs4WWuwJw GL+QXqjD+Sw6wmnUyd/WmD0zbcwSHsJgfC/IosqAppSdUPcPsiTgchs0irmtsmE1zjnJvZe1yzH2a ISxz0s/61Ofw8rDZzNanMw==; Original-Received: from [87.69.77.57] (port=1839 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 1o1hp4-0006nx-Sr; Thu, 16 Jun 2022 01:13:39 -0400 In-Reply-To: (message from Tom Gillespie on Wed, 15 Jun 2022 15:38:05 -0700) 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:234616 Archived-At: > From: Tom Gillespie > Date: Wed, 15 Jun 2022 15:38:05 -0700 > > If the primary subprocess created by make-process fails early then the > stderr process is not cleaned up and running kill-buffer on any stderr > buffer attached to the stderr process will prompt the user. Can you elaborate on what do you mean by "clean up the stderr process"? Do you see the code which does that in the "normal" cases? > Two early exits that can cause the issue are > > 1. in make-process if the command is not found > report_file_error ("Searching for program", program); > > 2. in create_process if vfork fails > report_file_errno (CHILD_SETUP_ERROR_DESC, Qnil, vfork_errno); > > I'm sure there are other failure modes that would trigger the issue. Sounds like we lack some unwind-protect call somewhere?