From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22440 invoked from network); 18 May 2021 14:53:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 May 2021 14:53:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1621349638; b=cZkmsXfPx7UNg+2LY1EhL7ufEC52zeQmfSrLr+k1gR2J51XIXCkY+UVvCahOkmoDXhGB7TglU4 uOyGADLLcZ5ft4L9CWgIWuA2NRydCy4npf3Kf5z5f8ttdg9yXuoMQerwYnLisSJUNqAySULI68 Ht+qVmRgeD1ioi+h2+wvKMTJba1D744DFIjxIgMn09GNvlsumoTEA3zCcrxViqdw7oDgvPhV9D S8KbPAuJjYDrnH/BIv10O0ed8WW0YxnG9sbs4Q5R7D8SRmkX2/fIStkM3p4aRPpW8EZo7bI4+B PPqXynLWlAOM+83HhxncGLI/prJBZzTt7S82hZqK9HKFeg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f51.google.com) smtp.remote-ip=209.85.210.51; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1621349638; bh=EbbuSE2SrhFXLDCKDk7JtKB7CxLJAAHIiHW8FftSu8k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=1H6xB2Fq7P3ZkfyGapGUAGWfck1BGqrsgdLF9xWHqEdIMk2oiyZaCP3c/UILAA4r7+HGQ5ayik Ysm0tutlzaZQYx3v7YMTW1E3eUw8Y3sSMqX6lrcOY+mDk3RjqjqJK3TK2jg8Gw+9ulim9t8QRk bgTCpAJd1a83AEC6g2NbyDZQeVKOePvfGpJ6kWQasPUW4zqiYb/PWmafo7ZT8cIrlk6fkxcLAk rZWN8WTTfQzpfuEUN8A0hWKlRGWbWYW46NUgIhmJhHXjLa+G5AyWbKWT34EuOHieIqM/Imescg p+olD1iljOQHsC9GB7Qp2FyHn7vG38NDd1Eo/jIs35fSGw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dTy78hbbQhb1pjpZKrFLINMZxkquqPM3BzhHv5xj6io=; b=c8peKjHJbYXi/ZJr/7HMxSPyby H94o83j85ZeLBP6So6MvNooIQtGXrnDX+B3AdpXJxdm4Z4ouhPd3iSWXB1JCN/xpbj5cIlyMQQ6LE ozhs121+G75NGRxiUpuvhTp2iI/HC1YvwS5GC0Bcn7DigC7QSKnUr5zJy+jyF70eSSt/K+pdgwZTt 1eKLiAq+IsOS3lY5yzXKWi3chr1i1Wb5uVI5WeW4ijEy2WbvDnJJKf++Ku/a4+hEOZkyk1YybPW/u nWVyLaTYriGzbNOmdrezO2a4rDM0w/j+q0UXtd43xpB8C0zmdcbPgxi2mH+XDsXiiMVa1RdvSRWup hi2jL9RA==; Received: from authenticated user by zero.zsh.org with local id 1lj16a-000G61-NK; Tue, 18 May 2021 14:53:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f51.google.com) smtp.remote-ip=209.85.210.51; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f51.google.com ([209.85.210.51]:40915) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lj16J-000Fn2-6W; Tue, 18 May 2021 14:53:39 +0000 Received: by mail-ot1-f51.google.com with SMTP id s5-20020a05683004c5b029032307304915so1587447otd.7 for ; Tue, 18 May 2021 07:53:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dTy78hbbQhb1pjpZKrFLINMZxkquqPM3BzhHv5xj6io=; b=zYO0ZGxDZ2+WXlSIz02m++NiKRclO6+qGqcLCTEEGu3+UIOu6D16NzACxGrr1Wse/C sZYilELKkuSt/1Tlj4OYy/6tMldnRdVB44SDq7iUtiMUyZByh8am/YYLoaroAKZJEelt Uy9q7P4BR3BOOtXlM+61h68n7CFMXelz1Xq/M42H7lwwC/kgdObqwr7Rb8w0jcZnghd3 DuzTfQzlISfZe6HoAMUOHDxT4YIt61Uj7bOQ5Q7pRp2LPTSDgJq03V9EgbErHSx7/0Df Rt+xH1nyVqILNKvGHRZfSI+Sg8sClMs46khUf0DDuqxo5ZJBmMO64qktBbA/s3ia5Azj c4MA== 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; bh=dTy78hbbQhb1pjpZKrFLINMZxkquqPM3BzhHv5xj6io=; b=bzO2G8vQMewDNnb1sfxo6ffHaNjL8W4e8i9FI+iQWkJ8vcWM3A1qrNpMD16m4Gr8Kj DwLQ/JWGYjz/7tOzpQgXD9MGMcZjakhS6bAHRbWxdU7YLGsE3Qmj2epCo1zDyapmnKFW dMgD+OIMGNK3aP4Jx4Zmu3R5VaQKPfF/usGa4bN1oL0cgkO1ckRy3drOkoVTe/Z9xWve FIkdOyWixHmYeylIMCC8s+Rjm0WU1wtCqt/6myN3CNijUv7ymTh6iWxWXgnUvfoDiUG4 DHy5kbpwePyq2oehjDN9A4stxa5C+GZcIUfXF39CSTpIA+mJ/MMbUyCcYw5CjGmLT0Dm 6PnQ== X-Gm-Message-State: AOAM532UeKorRM8I3gwz1JBw7z4B8K9Y47g+FbAWimPze2tdl+5eLPmw yyJrWyoL1uDc3g0HOp8/5/cYZtg1SywzH+Da4hBLLxBBZTD+YA== X-Google-Smtp-Source: ABdhPJwPFjz+V+QhSChT4MUvAOgDuztSBpHRV9GCuDUDw00sqV8sEqa+2CwtgItwAmtr+rlKEqnq4ucjF5VsRKh7cMI= X-Received: by 2002:a9d:170b:: with SMTP id i11mr4505146ota.161.1621349617487; Tue, 18 May 2021 07:53:37 -0700 (PDT) MIME-Version: 1.0 References: <20210516152418.GA39669@zira.vinc17.org> <20210517202608.GA3255290@zira.vinc17.org> <20210518081520.GA3332066@zira.vinc17.org> In-Reply-To: <20210518081520.GA3332066@zira.vinc17.org> From: Bart Schaefer Date: Tue, 18 May 2021 07:53:26 -0700 Message-ID: Subject: Re: $PPID not updated when the PPID changes (parent killed) To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48877 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Tue, May 18, 2021 at 1:17 AM Vincent Lefevre wrote: > > The zsh man pages use "subshell" at various places. They should be > consistent on what a subshell is, perhaps have a clear definition I believe that we are consistent in the usage of subshell in the docs, but the wider world sometimes uses subshell to refer to any shell started by another, e.g. in zsh -c 'bash -c "echo some people call me a subshell"' > at one place, and say what happens when a subshell is created. Frankly this is probably unhelpful except to people who want to make RTFM references. If "subshell" isn't a sufficiently understandable term in isolation, nobody who isn't deliberately reading through the entire manual is going to go looking for a definition when seeing "subshell" in some other context. > This is even more confusing, because there are actually 2 differences It's only confusing because you're making yourself confused. PPID is not a special variable. (Something for which we DO have an explicit definition). That means the only way it changes is when assigned to or unset. It's been this way for 30 years and nobody ever mentioned expecting it to change or being confused by that before you in this thread. sysparams[ppid] is explicitly a readonly API on a system call. It should be obvious from that that it changes if the value of the system call would change. It's been this way for 20-something years and again no complaints. It can't become necessary to spell out all the side effects of this type of thing in every possible situation, it's just untenable.