Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
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: <20130901182926.2ad24eb4@pws-pc.ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20130831234733.GA83723@redoubt.spodhuis.org> <20130901182926.2ad24eb4@pws-pc.ntlworld.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
response ...
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!"
?
Thanks,
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author