Hi Bob,

Thanks for the review.
Here is the original description of the issue.
There has been a build failure from SCT, related to https://edk2.groups.io/g/devel/message/60407?p=,,,20,0,0,0::relevance,,gEfiFormBrowserExProtocolGuid,20,2,0,74529350.
The build log printed the error code obviously but returned with sys.exit(0).
Unfortunately this behavior confused the build system and made me notice the failure so late.
If there is a concern of the conflict among multiple autogenworkers, I wonder how you think this way.

1. No change in BaseTools/Source/Python/AutoGen/AutoGenWorker.py
2. BaseTools/Source/Python/build/build.py

--- a/BaseTools/Source/Python/build/build.py

+++ b/BaseTools/Source/Python/build/build.py

@@ -880,7 +880,10 @@ class Build():

 

             self.AutoGenMgr.join()

             rt = self.AutoGenMgr.Status

-            return rt, 0

+            err = 0

+            if not rt:

+                err = UNKNOWN_ERROR << Use a fixed error type of FatalError instead of getting the exact error type from the autogenworkers.

+            return rt, err

         except FatalError as e:

             return False, e.args[0]

         except:


In this way, no change in the multi-thread operation and build.py is able to exit with a standard default error. It's not needed to catch the exact error type.
Please share your opinion.

Thanks,
Irene