Zsh Mailing List Archive
Messages sorted by:
Re: A serious bug in execution – where to debug?
- X-seq: zsh-workers 44598
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: A serious bug in execution – where to debug?
- Date: Tue, 30 Jul 2019 20:22:36 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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=NcW/z4hj+S7v5fUTnhIlmV4ewsAzJdFkEqgNdc7+J2g=; b=UyxX41YNrzER4gvK77qbK64ArGoepJI2iXHQJTAJqF7rQ7OSWQ+ZZYWXbMfJnZD0/j HXPBieDEk2zB7ZeetbyYMwaM2OML6mkdxasPuPsDhmdIik+6GbuQ0LoDySqelpwM1lYE YWTNNCezLWvUkix13WnzYEhrm4WhE0Uj1ZBcMWbaebNaH89670hRRbSO8VXcMg7SwZiR t38218vhKzez/6HAT2spA93zom/mo+uyuFQqJ6CDdAjf2pxmQS4hOyNSf9p9H8Y83O3k H6cwPRgK7Rt28DedoGzXvMcbmnxTn+etJEcPvufvOH3oaHNGyFVAR780j9WWSxgapz+O TFgQ==
- In-reply-to: <CAKc7PVB0piw70MfggmkWpGdkOxZNJrb2tZ+2LAao9N9QZ00bPA@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCKrg_PnZ6jKLoAwR8XQnswT-Bs2TJA7oefhd_gRtHKUQ@mail.gmail.com> <CAN=4vMpWFR=_TPZ2hcQC_FvKSiPFW2_isn_BYxYaoUKLqu-4Gw@mail.gmail.com> <CAKc7PVCn0PNzu5PxCW=nwZ6unt5CtTarPOo387yvg0+bekuSyQ@mail.gmail.com> <CAN=4vMqtA5k_rDfyn_Pk0Q6isxcJVN1mE+8-k+O=21qYDS+HCg@mail.gmail.com> <CAKc7PVB0piw70MfggmkWpGdkOxZNJrb2tZ+2LAao9N9QZ00bPA@mail.gmail.com>
On Tue, Jul 30, 2019 at 8:16 PM Sebastian Gniazdowski
> 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:
> > > Yes, implementation of plugin effects withdrawal (i.e. unloading)
> > > bases on this. I saw that your initialization of the prompt is called
> > > from precmd, where the shadowing isn't active. So (today) I've
> > > implemented: on-demand wrapping of any function call with the
> > > shadowing-enabling code, and then after a single call unwrapping. This
> > > way I'm able to unload your plugin.
> > When you unload plugins, you also remove temporary files and kill
> > background daemons, right?
> > Roman.
> 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?
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.
Messages sorted by: