gittup/tup — pull request #71 by foresterLV (2012-06-05 11:17:50+00:00)
Title: Fix Cygwin crash after injecting hook library.

It looks like Cygwin gets confused by receiving DllMain THREAD_ATTACH
notification when the library is not yet initialized causing it
to later crash. This can be easily reproduced by modifying tup-dllinject
to just CreateRemoteThread which does nothing.

Proposed fix changes injection method from remote thread to code cave
(write stub, adjust eip, resume). This method is safer in overall
because have no side effects of THREAD_ATTACH notification on loaded
libraries.