MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / blockingWriteToFD

Function blockingWriteToFD

lib/core/subprocessng.py:53–68  ·  view source on GitHub ↗
(fd, data)

Source from the content-addressed store, hash-verified

51 return output
52
53def blockingWriteToFD(fd, data):
54 # Another quick twist
55 while True:
56 try:
57 data_length = len(data)
58 wrote_data = os.write(fd, data)
59 except (OSError, IOError) as io:
60 if io.errno in (errno.EAGAIN, errno.EINTR):
61 continue
62 else:
63 raise
64
65 if wrote_data < data_length:
66 blockingWriteToFD(fd, data[wrote_data:])
67
68 break
69
70# the following code is taken from http://code.activestate.com/recipes/440554-module-to-allow-asynchronous-subprocess-use-on-win/
71class Popen(subprocess.Popen):

Callers 1

_controlMsfCmdMethod · 0.90

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…