Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: fc -ap -R stalls when called from sched
- X-seq: zsh-workers 39276
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: fc -ap -R stalls when called from sched
- Date: Sun, 11 Sep 2016 11:14:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=c2Mlt6icrTlJlEk/UxY0cisJuaoGn/m6w5dcglk0s7Q=; b=OCE12tri2aapwWzZ7Eo+N50KnFGKtCjkxZsznlRNiGJqItVtNUZDad8kNNPc1Rb2FD ZL+yxlt4Fny2DKUsaBJX4GKdMkNnhpwqn099V9ZaO0TyGDV8N+j5Q4G+ohDZS5922DfN MnwQABYYTI3OpqYlg64aomz0RpbMQYRn/JBKpyizHBBvdFQaBV9B6m3K+8Xz3UdwUxJW JuAnJsis0l/fM9qGIzsxTS7xAAof4nR0VpK0/weuvYymTPpXjtz6wEIC8Qx3kqlJVWFA O+oIlRL7NWk2A9UXqhMn5hSnOxHj3nPMtZJZJKqbH0+PKbqm5EmLZrJSX3Oji9x5hN4m Myjg==
- In-reply-to: <CAKc7PVCMC0O1vg+=bhbFmHDYGCRFmdb4837AbbHmN=zJ7fDBmw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDNXK2jnDxVXLUvLeqM7zgsU+ssZ-wfboXxNqyOynrmeQ@mail.gmail.com> <CAKc7PVCMC0O1vg+=bhbFmHDYGCRFmdb4837AbbHmN=zJ7fDBmw@mail.gmail.com>
PS. The commit with debug marks etc. is: 001a537
Best regards,
Sebastian Gniazdowski
On 11 September 2016 at 11:01, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> PS. Thought that I could provide a minimum test case. However, following:
>
> myfunction() { local -a arr; fc -ap -R ~/.zshrc; arr=( ${history[@]}
> ); print -rl -- "Read:" "${(@)arr[1,3]}"; }
> sched +1 myfunction
>
> works fine...
>
>
> On 11 September 2016 at 10:58, Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> wrote:
>> Hello,
>> I call function __convey_on_period_passed() from sched +1 mechanism.
>> There, I read an IO file (file used for data conveying). I use the
>> neat trick that worked for me in past, but not now:
>>
>> # Read input using history mechanism
>> local -a commands
>> () { fc -ap -R "$datafile"; commands=( ${history[@]} ) }
>>
>> Shell stalls for ~10 seconds, then continues with data correctly read.
>> Whole source with debug marks is here:
>>
>> https://github.com/psprint/zconvey/blob/001a5378177dcfdd0de388e19f5c7ca067c0a89c/zconvey.plugin.zsh#L174-L183
>>
>> Asciinema showing the effect:
>>
>> https://asciinema.org/a/9mfxg2j1jcwvoo7tb5x6bagr4
>>
>> Removing anonymous function doesn't help. Doing normal load via
>> commands=( "${(@f)"$(<$datafile)"}" ) does help.
>>
>>
>> The plugin is for: a) assigning IDs and names to Zsh sessions b) doing
>> "zconvey -n Devel vim ~/.zshrc" to fire up command on Zsh session
>> named "Devel" (not implemented yet, thus a manual print -rl -- is used
>> to fill IO file).
>>
>> Best regards,
>> Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author