[Rpm-maint] [PATCH 06/19] Add rpmpoltrans struct and helper functions

Steve Lawrence slawrence at tresys.com
Fri Feb 12 20:20:00 UTC 2010


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.


More information about the Rpm-maint mailing list