[Rpm-maint] [PATCH 06/19] Add rpmpoltrans struct and helper functions
Steve Lawrence
slawrence at tresys.com
Fri Feb 12 20:31:54 UTC 2010
On Fri, 2010-02-12 at 15:20 -0500, Steve Lawrence wrote:
> On Fri, 2010-02-05 at 12:26 -0500, James Antill wrote:
> > On Tue, 2010-02-02 at 15:25 -0500, Steve Lawrence wrote:
> > > + case 0:
> > > + if (!rpmIsDebug()) {
> > > + freopen("/dev/null", "r", stdin);
> > > + freopen("/dev/null", "w", stdout);
> > > + freopen("/dev/null", "w", stderr);
> > > + }
> > > + execv(pt->semodulepath, pt->semodargs);
> >
> > Are you sure this is the same as the std. dup2() code? AFAICS freopen()
> > does not guarantee to do that.
>
> I think close() should be enough. We're just trying to prevent semodule
> from displaying messages when it's executed.
Never mind about the close, I'm not sure what I was thinking. What is
the problem with freopen that dup2 solves?
More information about the Rpm-maint
mailing list