tech-userlevel archive

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

Re: ash backgrounding bug?



On Thu, Jun 05, 2014 at 06:39:19PM +0200, Edgar Fu? wrote:
> > Looks like a bug to me.
> I boiled it down to
> 
> #!/bin/sh
> 
> f() {
>       sleep 3
> }
> 
> echo $(sleep 3 >&- & echo $!)
> echo $(f >&- & echo $!)
> 
> where the first echo completes immediately, the second only after three 
> seconds.

Looks like it won't 'background' a shell function inside $(...)
a simple f & doesn't stop the shell.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index