Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doexec() - TerminateThread could damage stack and terminate output to client #7

Open
ultradumb opened this issue Nov 7, 2019 · 0 comments

Comments

@ultradumb
Copy link

I am suggesting to replace TerminateThread(handle, how) calls in doexec() with WaitForSingleObject(handle, INFINITE), or, maybe, give a small timeout instead of INFINITE. This will allow pipe-to-socket thread functions to finish correctly and deliver data to client (otherwise it is lost).
I did it using #define TerminateThread(h, f) WaitForSingleObject(h, INFINITE) just before switch(i) and then #undef-ing it after last break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant