MCPcopy Create free account
hub / github.com/ceph/ceph / create_shutdown_pipe

Method create_shutdown_pipe

src/common/OutputDataSocket.cc:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121#define PFL_FAIL ((void*)(intptr_t)1)
122
123std::string OutputDataSocket::create_shutdown_pipe(int *pipe_rd, int *pipe_wr)
124{
125 int pipefd[2];
126 if (pipe_cloexec(pipefd, 0) < 0) {
127 int e = errno;
128 ostringstream oss;
129 oss << "OutputDataSocket::create_shutdown_pipe error: " << cpp_strerror(e);
130 return oss.str();
131 }
132
133 *pipe_rd = pipefd[0];
134 *pipe_wr = pipefd[1];
135 return "";
136}
137
138std::string OutputDataSocket::bind_and_listen(const std::string &sock_path, int *fd)
139{

Callers

nothing calls this directly

Calls 3

pipe_cloexecFunction · 0.85
cpp_strerrorFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected