help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Why is sleep not a builtin


From: Greg Wooledge
Subject: Re: [Help-bash] Why is sleep not a builtin
Date: Fri, 22 Jun 2018 11:30:16 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Jun 22, 2018 at 09:33:53AM -0500, Jesse Hathaway wrote:
> I was curious as
> to why sleep is not a bash builtin so as to avoid all the forks, when waiting
> for another process to complete? The developer could have used wait, but
> then they can't provide any progress feedback to the user.

You can.  You just have to run the notification as a second child process
that you terminate when you're done waiting for the first child process.

I'm assuming the notification process is a spinner, or a stream of dots,
or something of that nature.  It's commonly done.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]