Skip to content

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

Description

@ultradumb

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions