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,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20903 invoked from network); 18 May 2021 19:41:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 May 2021 19:41:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1621366884; b=o/HFYW2eT8CSRa7dEOSQGt4ObUSKcBcxDTghSAXpD59CHGhUfy+syL1d45cvJcoa+Qg9s9AKpA X4qV9MkyPgZQ3fPMQysZhGy0WPT/4zqBDFEHb7kGwn4ZOtMJFCoGScpNa0zRCIKECpSS7GyWvO bRSRA8d6pLHaTmNeXtzZrVNA7J4iztxEWY2IyF9UqNi4SIIjjdnAL6S0tGjAzmy7ndmVBSzFuo F19lsBkvuqbEUmPWsDe0RQQ78VmJqR3mbuEWPpPAiAX4rwMm8YWdvJC3pBOWyUDT3UXyX4R2gN Pt+ClQbbSW/sBc/rvaTdMxkNhMfkHrlIT3QEIYlhFbj1Uw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (lb2-smtp-cloud8.xs4all.net) smtp.remote-ip=194.109.24.25; dmarc=none header.from=inlv.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1621366884; bh=lId3PDwzC5CjB6AQomoYGKlvyM5zkQuQ7PfsHmlM33k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:DKIM-Signature; b=x0smodZCKSRDoq0YwzjKq46reYeIo5078orjtzxqKpFdekZx8JA/NJ09Ti2chCazzFQ0XD/lm7 /XGK2vijTrgfgYvH89mFmD4euViGXAAuv3QzHSYVqxStsxSNz8ZpGF/N/qsneayYh/yeyEWjA9 DGasEEQjGkJ+gGoKm3jAm1dJcpop6lSAjsZB/3OhzFpLxoLGYadWgauf7e817O95TwCW5fXy29 cWE+XJg6f8j5Hka+1ghDcx4xyiFydw2hYcs1VYpezNnxueDMHsmNIDDdUy/7K9k0BwYVa22pMu PEdBaYL6Li2ihiN2ONWJTTBcitdF+lypTDHTIAvvr3fT+A==; 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-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=P6ier0aadyCiLqe55GEpGWiGB94Mi8GzzZO0v912Vx4=; b=MQpI4DcKSEKBWa7CzusOBoxZl5 zHC7FuUex+NhVRWjzZ3CptiivLc+/81NHUxmzGYUUxuL2631uK38Zz+7Az1XW4QwbcFkKEql8gGOn DGWYcc5PNtMON1p35Nx3/0Zo6VO+M5xCsLIk9AGV2Vhxo4M1pgLHujQktYcfVF1Hn7OKHuNJO/kbb XMmsTeyVrc2TRSb5xl4OqvT+fGmfzQBbOQTu1VJEtNm9GAkfcOvkdwS9rwtSKqKrQOHwg3L3Pan/3 643hMslmVSY2io0mP5ak3N2wQncdXb8KDhsGqkYCL6zjSPApDGDWjfvMB91mrMczba5+VX2r8wwZm 0S10hLJg==; Received: from authenticated user by zero.zsh.org with local id 1lj5al-0002zp-LZ; Tue, 18 May 2021 19:41:23 +0000 Authentication-Results: zsh.org; iprev=pass (lb2-smtp-cloud8.xs4all.net) smtp.remote-ip=194.109.24.25; dmarc=none header.from=inlv.org; arc=none Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:57343) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lj5aQ-0002hU-IH; Tue, 18 May 2021 19:41:03 +0000 Received: from cust-839a4cd3 ([IPv6:fc0c:c184:1742:62a6:ec35:71f7:b085:244]) by smtp-cloud8.xs4all.net with ESMTPA id j5aNlYTzJWkKbj5aPlqsSt; Tue, 18 May 2021 21:41:02 +0200 Subject: Re: $PPID not updated when the PPID changes (parent killed) To: Bart Schaefer Cc: Zsh hackers list References: <20210516152418.GA39669@zira.vinc17.org> <20210517202608.GA3255290@zira.vinc17.org> From: Martijn Dekker Message-ID: <8f589df8-7301-6802-7576-aca96c142ca8@inlv.org> Date: Tue, 18 May 2021 21:40:59 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfObROt2eH48qhpcZGBLRrrperQR0ptkU/01/zruwKgJG4Bb85PAzNni6RA3KCgiLkrob/mXFLOlj7swgxaptQgGm1tY3T1q/7gM7MkzDnnmQwhzEIZRa Bhg1vVZWzMPAfFT7KoFO40hFk8LssBTiQQIqdZ82I1zxvwTQnQodlypBs2AtVE1Qu2llVaU3oOGyVTSfi6zzKZ/2WLmS6lc/L8YkA96XqzmbHkCcUPhcQv9y pOU6H+wjB7hyf73Cw4tHptRe89f+WIS7mgkmMtEHolJ9zDFc5i0d5osFxOez6QLn X-Seq: 48887 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: Op 18-05-21 om 20:08 schreef Bart Schaefer: > On Tue, May 18, 2021 at 10:37 AM Martijn Dekker wrote: >> >> Op 18-05-21 om 01:15 schreef Bart Schaefer: >>> Aside, it's a bit odd that SHLVL isn't read-only. >> >> SHLVL is increased even when you do something like 'exec zsh' > > Actually no, it isn't. > > % echo $SHLVL && exec Src/zsh -fc 'echo $SHLVL' > 2 > 2 I see. Or, actually, zsh does increase it, but also decreases it when doing an 'exec'. Not all shells do the latter. What I got from ksh93 was: $ ksh $ echo $SHLVL 2 $ exec zsh -fc 'echo $SHLVL' 3 Since I now maintain a ksh93 fork, maybe I should fix its 'exec' to act like zsh. It seems like the sensible thing to do. -- || modernish -- harness the shell || https://github.com/modernish/modernish || || KornShell lives! || https://github.com/ksh93/ksh