• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
No Document.

            def _set_cloexec(fd):
        try:
            flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
        except IOError:
            pass
        else:
            # flags read successfully, modify
            flags |= _fcntl.FD_CLOEXEC
            _fcntl.fcntl(fd, _fcntl.F_SETFD, flags)
        


src/t/r/tramline-0.5.1/src/tramline/core.py   tramline(Download)
        path = os.path.join(tramline_upload_path(req), file_id)
        try:
            fd = os.open(path, tempfile._bin_openflags)
            tempfile._set_cloexec(fd)
            return fd, path, file_id
        except OSError, e:
            if e.errno == errno.EEXIST: