Skip to content

Commit

Permalink
lkl: fix windows python issue (freeze_support)
Browse files Browse the repository at this point in the history
On windows build, python script should declar freeze_support() according
to the document.  This commit adds this line to our headers_install.py
script.

Link: https://docs.python.org/3.13/library/multiprocessing.html#multiprocessing.freeze_support
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Dec 26, 2024
1 parent 9ea6634 commit 1c2c85d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions arch/lkl/scripts/headers_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,13 @@ def process_header(h):
print(" REPLACE\t%s" % (out_dir + "/" + os.path.basename(h)))
replace(h)

p = multiprocessing.Pool(args.jobs)
try:
p.map_async(process_header, headers).wait(999999)
p.close()
except:
p.terminate()
finally:
p.join()
if __name__ == '__main__':
multiprocessing.freeze_support()
p = multiprocessing.Pool(args.jobs)
try:
p.map_async(process_header, headers).wait(999999)
p.close()
except:
p.terminate()
finally:
p.join()

0 comments on commit 1c2c85d

Please sign in to comment.