Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/fd.pyc

ó
ÍÿŠTc@s+dZddlZddlZd„ZdS(sÛA utility module which has FD-related functions.

This module mostly exists for L{clean_fds}, so it can be imported without
accidentally getting a reactor or something else that might create a critical
file descriptor.
iÿÿÿÿNcCshtjtjƒd}td|ƒ}x<td|ƒD]+}ytj|ƒWq5tk
r_q5Xq5WdS(sçClose all non-stdio file descriptors.

    This should be called at the beginning of a program to avoid inheriting any
    unwanted file descriptors from the invoking process.  Unfortunately, this
    is really common in unix!
    iiiN(tresourcet	getrlimitt
RLIMIT_NOFILEtmintrangetostclosetOSError(t
rlimit_nofilettotal_descriptorstfd((s4/usr/lib/python2.7/dist-packages/landscape/lib/fd.pyt	clean_fdss
(t__doc__RRR(((s4/usr/lib/python2.7/dist-packages/landscape/lib/fd.pyt<module>s