MCPcopy Create free account
hub / github.com/3rdparty/libprocess / write

Function write

src/io.cpp:72–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72Future<size_t> write(int_fd fd, const void* data, size_t size)
73{
74 process::initialize();
75
76 // Check the file descriptor.
77 Try<bool> async = is_async(fd);
78 if (async.isError()) {
79 // The file descriptor is not valid (e.g., has been closed).
80 return Failure(
81 "Failed to check if file descriptor was asynchronous: " +
82 async.error());
83 } else if (!async.get()) {
84 return Failure("Expected an asynchronous file descriptor.");
85 }
86
87 return internal::write(fd, data, size);
88}
89
90
91namespace internal {

Callers 2

spliceFunction · 0.70

Calls 11

FailureClass · 0.85
cloexecFunction · 0.85
closeFunction · 0.85
loopFunction · 0.85
initializeFunction · 0.70
is_asyncFunction · 0.70
prepare_asyncFunction · 0.70
ContinueClass · 0.50
BreakFunction · 0.50
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected