Re: [ksh93u+m] alarm timer function

Liste des GroupesRevenir à cu shell 
Sujet : Re: [ksh93u+m] alarm timer function
De : addr (at) *nospam* is.invalid (Arti F. Idiot)
Groupes : comp.unix.shell
Date : 18. Mar 2024, 15:14:30
Autres entêtes
Organisation : Anarchists of America
Message-ID : <ut9i86$1q6o$1@nnrp.usenet.blueworldhosting.com>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 3/17/24 11:51 PM, Janis Papanagnou wrote:
On 17.03.2024 21:01, Kaz Kylheku wrote:
On 2024-03-17, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
The program 'busy' could be something like
>
   $ cat ~/bin/busy
   typeset busy='/-\|'
   typeset -i i=0
   alarm -r timer +0.25
   function timer.alarm { print -u2 -f "%c\b" -- "${busy:i++%4:1}" ;}
   ( "$@" & wait )
   unset timer
>
with 'alarm' and 'timer.alarm' used as supported by ksh93u+.
>
I suppose the 'at' command is not suited for such purposes.
>
Remember how I rigged something up in the Basta project to spontaneously
update the clock in the status line, while the shell is waiting for
input or running scripts?
>
Forked process periodically killing parent with signal, which has a trap
handler for it.
 Yes, I remember. There's a couple options to solve such a task. In case
I have a simple built-in method available I'd prefer that, though.
 Janis
 
I think several OSes have a tool called 'progress' which sort of functions as you've described; NetBSD does natively.  Having it built-in would be better though.  Was 'alarm' removed in ksh93?  I don't see it on the NetBSD pkgsrc version.

Date Sujet#  Auteur
17 Mar 24 * [ksh93u+m] alarm timer function14Janis Papanagnou
17 Mar 24 +* Re: [ksh93u+m] alarm timer function11David W. Hodgins
17 Mar 24 i`* Re: [ksh93u+m] alarm timer function10Janis Papanagnou
17 Mar 24 i +* Re: [ksh93u+m] alarm timer function2David W. Hodgins
18 Mar 24 i i`- Re: [ksh93u+m] alarm timer function1Janis Papanagnou
17 Mar 24 i `* Re: [ksh93u+m] alarm timer function7Kaz Kylheku
17 Mar 24 i  +- Re: [ksh93u+m] alarm timer function1Richard Harnden
18 Mar 24 i  `* Re: [ksh93u+m] alarm timer function5Janis Papanagnou
18 Mar 24 i   `* Re: [ksh93u+m] alarm timer function4Arti F. Idiot
18 Mar 24 i    +* Re: [ksh93u+m] alarm timer function2Janis Papanagnou
18 Mar 24 i    i`- Re: [ksh93u+m] alarm timer function1Arti F. Idiot
18 Mar 24 i    `- Re: [ksh93u+m] alarm timer function1John-Paul Stewart
18 Mar 24 `* Re: [ksh93u+m] alarm timer function2Keith Thompson
25 Mar 24  `- Re: [ksh93u+m] alarm timer function1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal