bug#1261: [BusyBox] bug#1261: Ash holds some extra file descriptors open
Steve Wahl
swahl at brecis.com
Thu Aug 1 09:46:03 UTC 2002
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 was suggesting comparing the two large versions might
> > make it easier to figure out what to change in the small version. You
> > know, the much less automated version of:
> >
> > diff rh-ash debian-ash | patch busybox-ash
>
> :))
> I not remove features from original source. Only algorithmics optimizations.
> You idea not have good result wfor patch ;)
That's what I meant by "the much less autometed version". :-)
--> Steve Wahl
More information about the busybox
mailing list