MCPcopy Create free account
hub / github.com/ElementsProject/elements / StdinReady

Function StdinReady

src/compat/stdin.cpp:56–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool StdinReady()
57{
58 if (!StdinTerminal()) {
59 return true;
60 }
61#ifdef WIN32
62 return false;
63#else
64 struct pollfd fds;
65 fds.fd = 0; /* this is STDIN */
66 fds.events = POLLIN;
67 return poll(&fds, 1, 0) == 1;
68#endif
69}
70
71NoechoInst::NoechoInst() { SetStdinEcho(false); }
72NoechoInst::~NoechoInst() { SetStdinEcho(true); }

Callers 1

CommandLineRPCFunction · 0.85

Calls 1

StdinTerminalFunction · 0.85

Tested by

no test coverage detected