From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4667 invoked by alias); 13 Sep 2016 08:50:04 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21885 Received: (qmail 27004 invoked from network); 13 Sep 2016 08:50:03 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.170):SA:0(0.0/5.0):. Processed in 0.310092 secs); 13 Sep 2016 08:50:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.170 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=8p7nqliljCOVIx7oIksnXDx2zdbjOy8ZWIVI11CjBVE=; b=aCE5fplSdt63uGhoGr4GCeo5cxANvDUtS7p3TaG+0/JRcNfClwU2zQ1OF0aOS3ZI4A yk2zD0Y78FvyAzyQ4wQpu+CSxgkjMdIEtNUOvMhs+PERknDxA8X4AZuWXAvYWSDttXOk IBciJ3YzrsXXxAAPFjq44zxkV0mqXZrJUh/Zk36VprUOyOMkG1NNT4QlLzoZGLdRxeEe ZkVL72bIEmaRn8JY7+14pI5yUrocxYb0zFfBGR3yY8JfVhEwox4hMy1LRkb4H/syVzCa gNvZXmca4BrXekoaX3hFLWO3kAB+b5BiuZALOhc0SWsrgZnlHOo+8yGU6g9KA9QlUMZN 4f4A== X-Gm-Message-State: AE9vXwMttOfap9az9zQXZjfjSO9U6D0EJEvg3o/zrd0M5c1eBdBNJU/D6KQRBicrXU5uMOjoAWlrBRvF62yHZQ== X-Received: by 10.237.51.101 with SMTP id u92mr25280931qtd.2.1473756595908; Tue, 13 Sep 2016 01:49:55 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Tue, 13 Sep 2016 10:49:35 +0200 Message-ID: Subject: Can periodic hook stop rescheduling? To: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, 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 =E2=80=93 I check when scheduled functi= on 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 it: "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 opportunity). " 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) Best regards, Sebastian Gniazdowski