[PATCH 1/2] Close file descriptors when running ntpdate (#1083978)

Colin Walters walters at verbum.org
Thu Dec 4 15:08:45 UTC 2014



On Thu, Dec 4, 2014, at 09:37 AM, Vratislav Podzimek wrote:
> On Thu, 2014-12-04 at 09:29 -0500, Colin Walters wrote:
> > On Thu, Dec 4, 2014, at 09:23 AM, Vratislav Podzimek wrote:
> > 
> > > +    # using iutil.execWithRedirect here would mean that if this function was run
> > > +    # multiple times from multiple threads in the same time, the execution would
> > > +    # be serialized because of the program_log lock
> > > +    proc = subprocess.Popen(["ntpdate", "-q", server], close_fds=True)
> > 
> > - Why not subprocess.call()?  (You should be able to pass close_fds=True to it)
> I doesn't seem to have that parameter.

See the full docs:

"The arguments shown above are merely the most common ones, described below in Frequently Used Arguments (hence the slightly odd notation in the abbreviated signature). The full function signature is the same as that of the Popen constructor - this functions passes all supplied arguments directly through to that interface."



More information about the anaconda-patches mailing list