--- Alex Landau <[EMAIL PROTECTED]> wrote:
>
> --- Mike Frysinger <[EMAIL PROTECTED]> wrote:
>
> > On Tuesday 24 July 2007, Alex Landau wrote:
> > > You may also find some code duplications with the fork_and_reexec
> > > functions
> > > (i.e. call to setsid, dupping /dev/null to 0,1 and 2),
> >
> > there is a bb sanitize io function which could alleviate some of this isnt
> > there ?
> > -mike
> >
>
> No that won't work. bb_sanitize_stdio() goes over descriptors 0,1,2 and if
> any is
> closed,
> connects it to /dev/null. I want to force them to be /dev/null.
> Second, the dups and setsid are combined with the re-execing, while in the
> start-stop-daemon case the child should continue and do some stuff before
> execing.
> And last, either I don't understand something, or the bb_daemonize_or_rexec()
> function
> that bb_sanitize_stdio() uses is broken: DAEMON_DEVNULL_STDIO is defined as
> 0, so we
> never close 0,1,2 (unless we're also re-execing) and that "if" is dead code.
>
> Alex
>
Are there any other problems with this patch?
Alex
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox