(self, flags)
return True
Python implementation of unshare
Python implementation of unshare
Python implementation of unshare
def unshare(self, flags):
        """Python implementation of unshare"""
        try:
            _unshare = ctypes.CDLL("libc.so.6").unshare
        except OSError:
            Msg().err("Error: in unshare: mapping libc")
            return False

        _unshare.restype = ctypes.c_int
        _unshare.argtypes = (ctypes.c_int, )

        if _unshare(flags) == -1:
            Msg().err("Error: in unshare:", os.strerror(-1))
            return False
        return True
def unshare ( self , flags ) : try : _unshare = ctypes . CDLL ( "libc.so.6" ) . unshare except OSError : Msg ( ) . err ( "Error: in unshare: mapping libc" ) return False _unshare . restype = ctypes . c_int _unshare . argtypes = ( ctypes . c_int , ) if _unshare ( flags ) == - 1 : Msg ( ) . err ( "Error: in unshare:" , os . strerror ( - 1 ) ) return False return True