MCPcopy Index your code
hub / github.com/python/cpython / DupFd

Function DupFd

Lib/multiprocessing/reduction.py:191–200  ·  view source on GitHub ↗

Return a wrapper for an fd.

(fd)

Source from the content-addressed store, hash-verified

189 return recvfds(s, 1)[0]
190
191 def DupFd(fd):
192 '''Return a wrapper for an fd.'''
193 popen_obj = context.get_spawning_popen()
194 if popen_obj is not None:
195 return popen_obj.DupFd(popen_obj.duplicate_for_child(fd))
196 elif HAVE_SEND_HANDLE:
197 from . import resource_sharer
198 return resource_sharer.DupFd(fd)
199 else:
200 raise ValueError('SCM_RIGHTS appears not to be available')
201
202#
203# Try making some callable types picklable

Callers 1

_reduce_socketFunction · 0.70

Calls 1

duplicate_for_childMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…