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

fc -ap -R stalls when called from sched

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:


Asciinema showing the effect:


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