From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.8414.1604027520970574928 for ; Thu, 29 Oct 2020 20:12:01 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: fengyunhua@byosoft.com.cn) Received: from localhost.localdomain ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 30 Oct 2020 11:11:51 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn From: "fengyunhua" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH] BaseTools: Fix BaseTools nmake cleanall hang issue Date: Fri, 30 Oct 2020 11:11:08 +0800 Message-Id: <20201030031108.2033-1-fengyunhua@byosoft.com.cn> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On windows system, when use command chcp displays the number of the active console code page, if the active console code is 936, run make cleanall in the BaseTools will hang. Issue reproduce step: chcp 936 edksetup.bat VS2015 cd BaseTools nmake cleanall Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng --- BaseTools/Source/C/Makefiles/NmakeSubdirs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py index 9b699ea086..1f4a45004f 100644 --- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py +++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py @@ -45,7 +45,10 @@ def RunCommand(WorkDir=None, *Args, **kwargs): output_lock.acquire(True) print("execute command \"{0}\" in directory {1}".format(" ".join(Args), WorkDir)) - print(message) + try: + print(message) + except: + pass output_lock.release() return p.returncode, stdout -- 2.27.0.windows.1