tools/replay: set the multiprocessing start method to fork

Python 3.14 has changed from fork to forkserver[1] which causes
libinput replay to fail with the following error when starting the
subprocesses:
   ValueError: ctypes objects containing pointers cannot be pickled

This is caused by the libevdev device being passed to the sub process.
A more proper fix may be to only initialize the device in the subprocess
and then signal the process to start replaying. But meanwhile, switching
back to fork will do.

[1] https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

Closes #1204

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1330>
This commit is contained in:
Peter Hutterer 2025-10-16 13:37:15 +10:00 committed by Marge Bot
parent 3725bb0b93
commit f9977dba9c

View file

@ -369,6 +369,8 @@ def check_file(recording):
def main():
multiprocessing.set_start_method("fork")
parser = argparse.ArgumentParser(description="Replay a device recording")
parser.add_argument(
"recording",