Don't leak hook startup handles.
authorIain Patterson <me@iain.cx>
Wed, 7 Sep 2016 14:12:42 +0000 (15:12 +0100)
committerIain Patterson <me@iain.cx>
Wed, 7 Sep 2016 14:12:42 +0000 (15:12 +0100)
commit2d1226f8479378969c42109cfc37becd6306867d
treec1ffc610f752bb44653cecb52bce8396b651be3e
parent62f28c55d444d846579159133dbe091809a2c08b
Don't leak hook startup handles.

When sharing I/O settings we dup the service's I/O handles then call
CreateProcess() to run the hook.  However we didn't explicitly close the
duplicated handles, so the subsequent CloseHandle() called by
cleanup_loggers() would hang, as the logging thread's ReadFile() won't
have completed due to the duplicated handle still being a potential
writer.
hook.cpp