MCPcopy Create free account
hub / github.com/apache/brpc / save_format

Method save_format

src/butil/files/temp_file.cpp:102–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102int TempFile::save_format(const char *fmt, ...) {
103 if (_reopen_if_necessary() < 0) {
104 return -1;
105 }
106 va_list ap;
107 va_start(ap, fmt);
108 const int rc = vdprintf(_fd, fmt, ap);
109 va_end(ap);
110
111 close(_fd);
112 _fd = -1;
113 // TODO: is this right?
114 return (rc < 0 ? -1 : 0);
115}
116
117// Write until all buffer was written or an error except EINTR.
118// Returns:

Callers 3

TestRetryOtherServerMethod · 0.80
TestRetryBackoffMethod · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestRetryOtherServerMethod · 0.64
TestRetryBackoffMethod · 0.64
TEST_FFunction · 0.64