Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
fc -ap -R stalls when called from sched
- X-seq: zsh-workers 39273
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: fc -ap -R stalls when called from sched
- Date: Sun, 11 Sep 2016 10:58:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=ernyvjCwv43+LaRYmf8xuo3494sskOOKax4Nhjl+/fA=; b=g8mR14T3JJ9fZIZsxp/dh/j7qQrU6/DgOaGb8NQjK6EdM+RXUkO9GbP8PiPFD0ZS3/ /pFW8IqfyHeah4GGkpUt/CjQOL02BDXmAKQejjyc9Qe2XEe7ZTRJeFlf2ZCsChEuhpuT 22ft5b89zeuv8+6fMKtiFN54oVm695j24Te/2TW1D5DKs2q+PDwP0ms5Ek9QC5j/QBxs XBBkMxBumlM4pAagamR3l3LtRjPeuj6QLtNuTr2PwZgbiEdxnYJN39lpguvOJb6lhdxU nJig+SAFmC6ur9c8fcyZ0iAedC0vdkCOwHnF2/izlNf76kwLWevPojgS3o8ylyuaRIRQ nK6A==
- 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
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