Pyoxidizer multiprocessing problem.
Opened this issue · 1 comments
jonike commented
Hello, guys.
When i compile program to pyoxidizer app in windows and run it. it's give me a error:
Traceback (most recent call last):
File "multiprocessing.spawn", line 107, in spawn_main
File "multiprocessing.reduction", line 79, in duplicate
TypeError: DuplicateHandle() argument 2 must be int, not dict
#code :
import multiprocessing
def run_webview():
...
p = multiprocessing.Process(target=run_webview,args=())
p.start()
What happen?
jonike commented
IN Lib/multiprocessing/reduction.py:
def duplicate(handle, target_process=None, inheritable=False, *, source_process=None):
'''Duplicate a handle. (target_process is a handle not a pid!)'''
current_process = _winapi.GetCurrentProcess()
if source_process is None:
source_process = current_process
if target_process is None:
target_process = current_process
print("source_process:", source_process)
print("handle:", handle)
print("target_process:",target_process)
return _winapi.DuplicateHandle(
source_process, handle, target_process,
0, inheritable, _winapi.DUPLICATE_SAME_ACCESS)
==========================
Result In python.exe
source_process: 344
handle: 348
target_process: 18446744073709551615
Result in pyoxidizer compiled.exe
source_process: 18446744073709551615
handle: {'parent_pid': 21052, 'pipe_handle': 332}
target_process: 18446744073709551615
Please, anyone can help me?