| 63 | } |
| 64 | |
| 65 | bool StdinReady() |
| 66 | { |
| 67 | if (!StdinTerminal()) { |
| 68 | return true; |
| 69 | } |
| 70 | #ifdef WIN32 |
| 71 | return false; |
| 72 | #else |
| 73 | struct pollfd fds; |
| 74 | fds.fd = STDIN_FILENO; |
| 75 | fds.events = POLLIN; |
| 76 | return poll(&fds, 1, 0) == 1; |
| 77 | #endif |
| 78 | } |
| 79 | |
| 80 | NoechoInst::NoechoInst() { SetStdinEcho(false); } |
| 81 | NoechoInst::~NoechoInst() { SetStdinEcho(true); } |
no test coverage detected