w32: Fix closing file descriptors.
authorJustus Winter <justus@g10code.com>
Mon, 23 Jan 2017 14:08:23 +0000 (15:08 +0100)
committerJustus Winter <justus@g10code.com>
Mon, 23 Jan 2017 14:08:23 +0000 (15:08 +0100)
commit6f02133bb07726afa6950e5b4685e75621276e60
tree83433df52821ea93dad71effa35c58f02c25233d
parentca69df8c8d3f044340aee2a118cc20d33cd600a1
w32: Fix closing file descriptors.

* src/w32-io.c (writer): Only stop once the buffer is drained.
(destroy_writer): Wait for the writers buffer to be drained.  This
aligns '_gpgme_io_close's behavior with close(2) and fclose(3).

GnuPG-bug-id: 2881
Signed-off-by: Justus Winter <justus@g10code.com>
src/w32-io.c