Zsh Mailing List Archive
Messages sorted by:
Re: sleep $floatval
- X-seq: zsh-workers 31683
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: sleep $floatval
- Date: Sun, 1 Sep 2013 19:33:40 -0700
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=SkovuCBRkzl7RotwRqXjNMw6XBebZQqQHnRdTouVnW4=; b=HOQu9M/EAenmrB3E356MlW1XYSJdnC07IEkJeDRAgTzi2sU/FMJrv23b5/lsQPCw5oVdLKhQXcMa2dQEgDiS9HHzbB5rrE9qHiNf/AiOEnLF4b3o5POLacFdZXfzQt1PtcuC1AU4EYKHX5UkmnEDTXdmLVljC82P4CcAVZoHFRI=;
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20130831234733.GA83723@redoubt.spodhuis.org> <email@example.com>
On 2013-09-01 at 18:29 +0100, Peter Stephenson wrote:
> On Sat, 31 Aug 2013 16:47:33 -0700
> Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> > What do folks think about sleep being a builtin, which can take
> > arbitrary formats and avoid forking an extra process, just to delay?
> You can use "zselect -t <hundredths>" to delay a number of 100ths of a second.
> (I think I added it before floating point was widely used in the shell.)
> It would also be easy to add a sleep subcommand to zsystem.
Crazy, idle, thought, to which a scream of horror might be the correct
Say I do add a zsleep command; if the sleep returns EINTR, then before
going back to sleep for the remainder of the duration, the command could
report on reaped jobs immediately, so that instead of being pre-prompt,
job termination could be reported immediately during the length of the
sleep. (At which point, zsleep might as well take an option giving it a
function list variable to be be walked, any time it is woken up, to let
arbitrary handlers be invoked, before resuming sleep, and possibly with
a way to abort and avoid going back to sleep).
Does this make people go:
1. "Hrm, interesting, that suggests some use-cases that might be neat"
2. "AARGH BY THE OLD ONES HELL NO!"
Messages sorted by: