Is my process waiting for input?

Depending on what the 3rd party process is doing exactly you could try polling its threads’ states:

foreach(ProcessThread thread in process.Threads)
    if (thread.ThreadState == ThreadState.Wait
        && thread.WaitReason == ThreadWaitReason.UserRequest)
            process.Kill();

Failing that… you can try to

process.StandardInput.Close();

after calling Start(), I conjecture that an exception will be raised in the child process if it’s trying to read from standard input.

Leave a Comment