Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A serious bug in execution – where to debug?



On Tue, 30 Jul 2019 at 20:22, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Tue, Jul 30, 2019 at 8:16 PM Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> wrote:
> >
> > On Tue, 30 Jul 2019 at 20:12, Roman Perepelitsa
> > <roman.perepelitsa@xxxxxxxxx> wrote:
> > >
> > > On Tue, Jul 30, 2019 at 7:55 PM Sebastian Gniazdowski
> > > <sgniazdowski@xxxxxxxxx> wrote:
> > No. I guess that the temp-files removal can be easily added – by
> > 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-fun).
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.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author