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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 f3da3472 for ; Tue, 30 Jul 2019 21:00:26 +0000 (UTC) Received: (qmail 19945 invoked by alias); 30 Jul 2019 18:54:00 -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: 44602 Received: (qmail 15690 invoked by uid 1010); 30 Jul 2019 18:54:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f48.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.217.48):SA:0(-2.0/5.0):. Processed in 2.77892 secs); 30 Jul 2019 18:54:00 -0000 X-Envelope-From: sgniazdowski@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.217.48 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:content-transfer-encoding; bh=EKEb6DLGDu7KvfAlbpJvNFr/EcfQUnFP0AnEGySE5Oo=; b=To1oVYo7DBLtZruVfEoLHJmHNeZ4xE+AGhymwTgAqIUp/yveWeuizhIpQ5dV8oYX0k y5lWTmH35/MBCZaXrJoITxX57xpQ8/Cqiu7L+SGb7IFYRZin8utRS03EikYFNmmjNGNh K5QkgLPa30wy7dPqGNLWKyDXiu671uCD+SHEEffL7GZoFM0o0G1Yvaxh+JmWmkpCqPRp sX45EDS+hx9aCzead0yQqwQxczPOfPx/s1lXsrXqrPZX9cMwpdq79NCYA113NJ7uoQxG sGhefPZILbGXTD+w5NmFMpPF1D9M6aN2UCpKDq1NBsNW8n07d762bTu+G783xY0mtcl3 bSsA== 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:content-transfer-encoding; bh=EKEb6DLGDu7KvfAlbpJvNFr/EcfQUnFP0AnEGySE5Oo=; b=MdhwFWVKFU/+tC7/aorvlrk+MXxFESYi5lBSeV7JFG3Kvnhl5RU5HvPAVtFX/bPZkn HKuromMiu6CgAaYX9neKlF6FrL9m7JMjWsVw9EGfy+ImeE0B/clsI0lNofbRSaE704qw ueEsp+OVIN1Rhm39Zcf+gFOMKsjIq0qGX2OULYjz+9wtI1JH2vG4Ws23txHiIxVNE5/t t/quo+LtM2nB0yFsOtqDgljQ3SHeKcHr1xfRpHeWY1G8BKrxEb1YpbVHzlnaK7G8zcod 7MpNBDA9qaulWYVasd+qyr3KhTHyEQjuHGdPVgGaxhTG4HwAEmm5n9kdSY4ixovc40Vs F++Q== X-Gm-Message-State: APjAAAV/sLJEMORzo3Ngu1T5TOoQDQeRZFanwAzkB0MF92T+LHnaYbKh 4pB0SA1pYaWF6UTfczQdQ7ggPIWfsWzEkz/7Jwo= X-Google-Smtp-Source: APXvYqzsEvP7dPDXRTIm/QFFcK/s8teT/DKVRdmC0A87CbqlMw4gxdZZqTgheAFhKE1CiwAeWhseRonQNfaQy7A5Suc= X-Received: by 2002:a67:8e0a:: with SMTP id q10mr50948516vsd.215.1564512804449; Tue, 30 Jul 2019 11:53:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Tue, 30 Jul 2019 20:53:13 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 30 Jul 2019 at 20:22, Roman Perepelitsa wrote: > > On Tue, Jul 30, 2019 at 8:16 PM Sebastian Gniazdowski > wrote: > > > > On Tue, 30 Jul 2019 at 20:12, Roman Perepelitsa > > wrote: > > > > > > On Tue, Jul 30, 2019 at 7:55 PM Sebastian Gniazdowski > > > wrote: > > No. I guess that the temp-files removal can be easily added =E2=80=93 b= y > > shadowing mktemp call. I didn't think about killing of the background > > processes. I guess this too can be added, but I suspect that most of > > them will be invisible in $jobtexts, i.e. disowned, so it might get > > hard. Thanks for the suggestions. How are you running the gitstatus > > process in the plugin? > > 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? > gitstatusd and p10k both have clean shutdown in their public APIs. It > was quite difficult to implement. By using this API you release all > resources and can initialize the plugins once again within the same > shell. However, if you unset internal variables or close file > descriptors, or fail to kill daemons, you are in undefined behavior > land and all bets are off. This might be a good use case for the proposed unload function (http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#unload-fu= n). If you would provide a function powerlevel10k_unload_plugin, then I would call it in Zplugin when unloading the plugin, allowing the function to close the background process. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org