[BusyBox] bug#1261: BusyBox] bug#1261: Ash holds some extra file descriptors open

Vladimir N. Oleynik dzo at simtreas.ru
Thu Aug 1 10:21:03 UTC 2002


Steve,
 
> On Thu, Aug 01, 2002 at 07:13:50PM +0400, Vladimir N. Oleynik wrote:
> > > > >
> > > > > Small script to reproduce this:
> > > > >
> > > > > ( (sleep 5 ; echo "hello") 2>&1 | cat >/dev/tty 2>&1 & ) 2>&1 | cat
> > > > >
> > > > Hmm. Yes. But why not replace to:
> > > >
> > > > ( (sleep 5 ; echo "hello") 2>&1 | cat >/dev/tty 2>&1) 2>&1 | cat &
> > > >
> > > > ? I think - this very standart and simply for understanding.
> > >
> > > You've changed the meaning of the pipeline.
> >
> > Hmm. meaning pipeline...
> > What meaning in your exampe? Your exampe backrounded also.
> >
> 
> Does this help your imagination:
> 
> ------------------------------
> (
>         echo "commands to read config file go here"
>         echo "commands to do other setup for the daemon go here"
>         if [ $? -ne 0 ]
>         then
>                 echo "setup commands failed" >&2
>                 exit 1
>         fi
>         (
>                 echo "simulating daemon"
>                 sleep 30 ;
>                 echo "daemon simulation complete"
>         ) 2>&1 | logger -p daemon.error -t ipsec_daemon 2>&1 &
> 
>         echo "daemon startup complete"
> ) 2>&1 | logger -s -p daemon.error -t ipsec_setup 2>&1
> 
> echo "Now continuing RC script."
> ------------------------------
> That's closer, and illustrates why the problem has meaning.

I not found different meaning with bash 2.0.3 and ash busybox 0.61pre.


--w
vodz



More information about the busybox mailing list