From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 2d43ae90 for ; Tue, 30 Jul 2019 20:58:48 +0000 (UTC) Received: (qmail 10819 invoked by alias); 30 Jul 2019 19:42:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44605 Received: (qmail 1374 invoked by uid 1010); 30 Jul 2019 19:42:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f52.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25524. spamassassin: 3.4.2. Clear:RC:0(209.85.166.52):SA:0(-2.0/5.0):. Processed in 1.582564 secs); 30 Jul 2019 19:42:37 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.52 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bAiEXbX4xTjxNfKXKQKwP2igpXEW7ixeDBaATAfMzKc=; b=FNZdqFio82q66SWg0fYktd9go9JMcsd2+/hmjHHonrCxfUWwmJo2S9Aegv8v1hb7q1 RRhVkCWpcIMG0H+ON4MsTVsG5fIJBepB+ZTjKUs3AR6kpPBfd5vNkVdyRJcMQFVvyYJ8 PmYTN1Wh4F0kiWa0qv5HvhyZ1VPOoLwJGhde9guNQ0Hbii4+NDETRjHRWBpWX5mwjNrp jVIqx8TNVZORsz7bTrH3+3hLzdxIbL/Cy0p3uz/LF9Yrn0YDWk9n3IvevtaS3KoDHclr QQeSYifbLkciyHKbv2urjGxGMphABoybF3RMaf7GszNXIoNjmyCVrO1K3xPy0NV3wJg5 cQoA== 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=bAiEXbX4xTjxNfKXKQKwP2igpXEW7ixeDBaATAfMzKc=; b=AwvQByX7jN0ebK6e1SR0w0LeWWYR/2JkzQ1a5MiwFC2mq/Nw5uxPgQnFPSFqowpuxQ IiBhqrH6rVrH/4k9EmI334eW0dbVPnnMC5w7obZpXLjhjRlkrP1lZZDbwgUAiTV5xudZ A3TCxcDeEK7SsNCMeEsfohj//qj5xhbgwZkvqZMEDUx6D78RQ7TMZeqEQmpEs64proNp YNbPyMFK2XH5ipt82bmA/RK1bUrPkUm6V5ArOX8aYNAYaVKTJusgyVyYQAC66A11001d f0txioVkdrrgJ16dyLXnwUtM+RD1332ea73hoAtKev8e8PBugqPcE/dDPPXOC/xOYac3 /YgA== X-Gm-Message-State: APjAAAWmX4tIBx/2dqGMnXEI/SeZqu9Z/mr7lSOAu385WbSktZa6pyjN fV6inqytyPah7kcl324gS/7z8+w5jIb5FyYnGrs= X-Google-Smtp-Source: APXvYqygDbfDQmaV1t4aCHugE5yV8GuT8EAWNMWPyhyZzbZmi3O98k/bjdhLbZpnfSchLde9ER11d7QZ6cnCk52Eqzs= X-Received: by 2002:a5e:db0a:: with SMTP id q10mr21603566iop.168.1564515723046; Tue, 30 Jul 2019 12:42:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 30 Jul 2019 21:41:51 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: multipart/alternative; boundary="000000000000eaf47e058eeb33c8" --000000000000eaf47e058eeb33c8 Content-Type: text/plain; charset="UTF-8" On Tue, Jul 30, 2019 at 9:34 PM Sebastian Gniazdowski < sgniazdowski@gmail.com> wrote: > On Tue, 30 Jul 2019 at 21:24, Roman Perepelitsa > wrote: > > > > On Tue, Jul 30, 2019 at 8:53 PM Sebastian Gniazdowski > > wrote: > > > > > > On Tue, 30 Jul 2019 at 20:22, Roman Perepelitsa > > > wrote: > > > > > > > > Do you think it's possible to implement clean shutdown and reentrant > > > > initialization for a piece of code as blackbox? > > > > > > What do you mean exactly? As a blackbox - as a regular, repeatable > method? > > > > In order to implement clean shutdown for a piece of code with > > non-trivial capabilities you have to rely on its implementation > > details. You cannot implement generic clean shutdown that will work > > with any code. > > Yeah but this is solved by the unload function that I've described in > the previous post. > I think we are in agreement. If there is a public function to unload, you can call it. If there isn't, it's a missing feature that cannot be provided by anyone other than the code's author. it's not possible to safely unload code as a blackbox without knowing all of its implementation details. Both gitstatusd and p10k do provide public functions for unloading. You are welcome to call them. They guarantee that repeated load+unload won't leak resources. That is, as long as you don't unset any of their internal variables. They do leave a handful of global parameters after unloading; without them they cannot be loaded correctly again. Roman. --000000000000eaf47e058eeb33c8--