]> git.pond.sub.org Git - empserver/commit
Simplify Windows client to react to Ctrl-C always
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 12 Apr 2009 09:46:22 +0000 (11:46 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 30 Nov 2009 18:43:50 +0000 (19:43 +0100)
commitf4209f7ea9c8d5b1c2f4ced117ffde75e1d84805
treeb627cf8a7b9a52b41895d97cfa6e8b17e1365061
parent2bfe7a1198ae20e8c58a7ef7fb5a9d16e0ddbaf8
Simplify Windows client to react to Ctrl-C always

When select() gets interrupted by SIGINT while a handler is active
without SA_RESTART, it returns immediately with EINTR.  w32_select()
did that only while it waited for standard input to become ready for
reading.  This isn't the case when:

* The client has already received EOF on standard input.  But then the
  action is SIG_DFL, so there was no problem.

* Reading standard input is suspended until the server drains the
  input buffer.  Then reaction to Ctrl-C got delayed until the socket
  got ready, and w32_select() returned normally.  Harmless, because
  the reaction merely appends to the input buffer.

Change w32_select() to match select()'s behavior anyway.
src/client/play.c