28385db6e1
While |WaitForMultipleObjects| works for both sockets and stdin, the latter is often a line-buffered console. The |HANDLE| is considered readable if there are any console events available, but reading blocks until a full line is available. (In POSIX, line buffering is implemented in the kernel via termios, which is differently concerning, but does mean |select| works as expected.) So that |Wait| reflects final stdin read, we spawn a stdin reader thread that writes to an in-memory buffer and signals a |WSAEVENT| to coordinate with the socket. This is kind of silly, but it works. I tried just writing it to a pipe, but it appears |WaitForMultipleObjects| does not work on pipes! Change-Id: I2bfa323fa91aad7d2035bb1fe86ee6f54b85d811 Reviewed-on: https://boringssl-review.googlesource.com/28165 Reviewed-by: Steven Valdez <svaldez@google.com> Commit-Queue: Steven Valdez <svaldez@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> |
||
---|---|---|
.. | ||
args.cc | ||
ciphers.cc | ||
client.cc | ||
CMakeLists.txt | ||
const.cc | ||
digest.cc | ||
file.cc | ||
generate_ed25519.cc | ||
genrsa.cc | ||
internal.h | ||
pkcs12.cc | ||
rand.cc | ||
server.cc | ||
sign.cc | ||
speed.cc | ||
tool.cc | ||
transport_common.cc | ||
transport_common.h |