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

Function read_signed

Lib/multiprocessing/forkserver.py:466–475  ·  view source on GitHub ↗
(fd)

Source from the content-addressed store, hash-verified

464#
465
466def read_signed(fd):
467 data = bytearray(SIGNED_STRUCT.size)
468 unread = memoryview(data)
469 while unread:
470 count = os.readinto(fd, unread)
471 if count == 0:
472 raise EOFError('unexpected EOF')
473 unread = unread[count:]
474
475 return SIGNED_STRUCT.unpack(data)[0]
476
477def write_signed(fd, n):
478 msg = SIGNED_STRUCT.pack(n)

Callers

nothing calls this directly

Calls 2

unpackMethod · 0.80
readintoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…