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

Steve Wahl swahl at brecis.com
Thu Aug 1 10:46:47 UTC 2002


On Thu, Aug 01, 2002 at 08:28:18PM +0400, Vladimir N. Oleynik wrote:
> > The problem is not the value of an exit, nor the output.  The problem
> > is that a file descriptor is not closed, so a pipe remains open and
> 
> Its bug? I think - this modern feature/extension.

I suddenly wish my AT&T unix PC was still functioning.  I'm quite sure
nearly all shells derived from the original Bourne shell will do this
correctly.

> > the last logger *doesn't exit*.
> 
> Can`t reproduce :(
>  
> > I needed to add a >/dev/null to the logger in the background:
> 
> Yes. Standart decision.
> 
> > (
> >         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 >/dev/null 2>&1 &
> >         echo "daemon startup complete"
> > ) 2>&1 | logger -s -p daemon.error -t ipsec_setup 2>&1
> > echo "Now continuing RC script."
> > 
> > --> Steve

Sorry I wasn't clear,

With that last change, adding the >/dev/null, the script functions
propperly on Bash but doesn't with busybox ash.

And the problem still happens in 0.61pre.

--> Steve





More information about the busybox mailing list