Zsh Mailing List Archive
Messages sorted by:
Can periodic hook stop rescheduling?
- X-seq: zsh-users 21885
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Can periodic hook stop rescheduling?
- Date: Tue, 13 Sep 2016 10:49:35 +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 :content-transfer-encoding; bh=8p7nqliljCOVIx7oIksnXDx2zdbjOy8ZWIVI11CjBVE=; b=o0S6FPcJWvzLSNcDhz+HRZbgQf65uJL+SbXAYKf57uhPQVnGmloQSekXhB5mazMpOs MOdympFRBrtpxe51JmoWiF5MnKlkl+hv5NF2wuRcq/ppvAcwfFmddH0qHhHcS0PDSr2z d+DQcdGzfUyCg9SA/e7HHDuouIbGa7tzgVybqN1JGGEPv0Jq6KWL4bBNxKBMrJn+bMVM XHiDWrGkObAFKNRyq0rsQGaRHpqeUuAV555FdPlG/HmEFr1lfZheB+sc+w8jBvnokDdL xOHgLsxARYFSIKczGXWXAS3PmCLVuQQxjzCa8uYecPZ5nEDTFVy9Rs3zkWEWIhblDHnN /OFQ==
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I'm using sched to call a function. The problem is, it sometimes
doesn't reschedule. sched +2 is the first line of the scheduled
function, however I observed, that when running a completion and
pressing Ctrl-C to abort something in it (when using
:completion:*:*:*:default' menu yes select search) this Ctrl-C might
somehow apparently reach scheduled function and block reschedule. I've
added a protection via preexec hook – I check when scheduled function
did last run and reschedule when a delay is detected.
I thought about adding such protection via periodic hook. The question
is: is it fully robust? Doc says that error in precmd will stop
periodic function, however it isn't clear about next expected run of
"Note further that an error in a precmd hook causes an immediately
following periodic function not to run (though it may run at the next
So, is the reschedule of periodic fully robust, or is it possible that
error in precmd (and maybe Ctrl-C press) will block reschedule?
(blocking single run is fine)
Messages sorted by: