MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TokenRead

Method TokenRead

src/util/tokenpipe.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59int TokenPipeEnd::TokenRead()
60{
61 uint8_t token;
62 while (true) {
63 ssize_t result = read(m_fd, &token, 1);
64 if (result < 0) {
65 // Failure. Check if the read was interrupted by a signal,
66 // in that case retry.
67 if (errno != EINTR) {
68 return TS_ERR;
69 }
70 } else if (result == 0) {
71 return TS_EOS;
72 } else { // ==1
73 return token;
74 }
75 }
76 return token;
77}
78
79void TokenPipeEnd::Close()
80{

Callers 3

fork_daemonFunction · 0.80
AppInitFunction · 0.80
waitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected