Subject: 30.0.50; The primitive-function "call-process-region" returns "internal error" and causes high cpu usage on win10

From: leuven65 <[email-masked]>
Date: Tue, 23 Apr 2024 20:02:39 +0200

On windows10, I uses git for windows, but when I execute "gitk" by
"shell-command"
in emacs, it returns an error "internal error",
and emacs's cpu usage becomes full forever, except for restarting emacs,
It seems emacs might process something wrong in this case.

The issue can be easily reproduced by directly eval following sexp:

(call-process-region (point-min) (point-max)
                     "cmdproxy.exe"
                     t
                     t
                     nil
                     "-c"
                     "gitk")