Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Sam Liddicott Newsgroups: gnu.bash.bug Subject: Re: leaks fd for internal functions but not external command Date: Tue, 23 Jul 2019 16:20:47 +0100 Lines: 21 Approved: bug-bash@gnu.org Message-ID: References: <5c34ecd5-c8b2-7000-46bc-1bbe3f71f163@case.edu> <78679ee9-fdaf-5180-d32f-81d92b936538@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1563895287 18540 209.51.188.17 (23 Jul 2019 15:21:27 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org, bash@packages.debian.org To: Chester Ramey Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=liddicott-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=thWQZIVYyEk03qfa1wbv2L+AYPtAD036+guzz0tS6Iw=; b=0pM10lzEYT28bOJoIaYDE0J/lCfvfVMxLHAKeWVYe8SrVC5zxzEtJFLv9G6+LVgLOE iwoHdLdXQTaw92nYOzs7dfUpXU6ZWhWYyBBwAf5Tot656GpAEpefRz4+5keAYS/pq97r rsEBGiS/NRA+u30hebDSP+HtjghnVo3MTyGZli9jUD/BvTpgWss1D8izKno7b0R+qJgz PmIBRojGqUcF5TpAWPx6JpSf8PlMmXivHTdCQLie2OGPv/Nk5PCipEVTDumAwneqRPHI WGUVTL/MtENVDQUp43Z1R0rVMkMLTfXgKhH8mdpXjlyBNh9ogHeM4THg17zzfqMy/K2M MyCg== 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=thWQZIVYyEk03qfa1wbv2L+AYPtAD036+guzz0tS6Iw=; b=HAoI0EtIyiaDZ13lAYX740GuDoNpZCeoPQrFa78ZDCe/E5uJzrfauRlFxgKheOLnnM SAtT7myWZKS+yoMarworeaZAaOaEoz14Z2axPz5U0pBG9sjr8RhL9XJcpzqFuoiwDCUO dSScLfLli8xv99W1m63EFOzGSrKN53fhid2GOQU5vL5mUkSGtGQaEfo58Q/+gQDWO/zA L6RPPUHYSpp99MaMvK8qjrs1gRl/jDsF1vC/T0YfDb0r9YQ42DpuKE8pHseMhCf2Msrj dXtNlwYCOxkOxAq/U/8u5ipw4ylL4ePfbiuFtu4eum9LA0/I6Ar3PK1MaPNT+Vkzufxp ZaSw== X-Gm-Message-State: APjAAAWPbdoU+sxxzAOt8LPFPIBgg4bj3jEcFNCSzdCMleCIbJhpEtB1 vh8/KgUcKY00xiEremV5rBZJJwYeD1IfwVNzvvo= X-Google-Smtp-Source: APXvYqzx65YW8Ug4tnX0aypTRuigrq6p5+/bFXc/CQEk8PWevXEku3LHS87gQ64XMLdQpcUFEkmEGuYusgescxagEmg= X-Received: by 2002:a2e:898b:: with SMTP id c11mr41199840lji.241.1563895283297; Tue, 23 Jul 2019 08:21:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <5c34ecd5-c8b2-7000-46bc-1bbe3f71f163@case.edu> <78679ee9-fdaf-5180-d32f-81d92b936538@case.edu> Xref: csiph.com gnu.bash.bug:15211 On Tue, 23 Jul 2019 at 16:15, Sam Liddicott wrote: > > > On Tue, 23 Jul 2019 at 16:13, Chet Ramey wrote: > >> On 7/23/19 11:11 AM, Sam Liddicott wrote: >> >> > The report concerns the different behaviour with internal and external >> > operations. >> >> Right. The close-on-exec is deliberate. That's how it was intended. >> > > Doesn't close-on-exec usually takes effect only on the process that does > the exec? > i.e. the fork that does the exec, not the parent process? > It got closed in the parent. The lsof is running for the parent, the main process. /bin/echo has quit before the lsof runs.