Try to fix a bug in Unix

multiprocess bug of python in Unix operating system:
The subprocess will not start when using 'fork' mode. This will make the UDP server down.
This commit is contained in:
Lost-MSth
2022-04-05 22:12:23 +08:00
parent 4b8c5a520e
commit 35c34f25d5
2 changed files with 17 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ import server.arclinkplay
from udpserver.udp_main import link_play
import os
import sys
from multiprocessing import Process, Pipe
from multiprocessing import Process, Pipe, set_start_method
from urllib.parse import parse_qs, urlparse
@@ -899,6 +899,7 @@ def main():
if __name__ == '__main__':
set_start_method("spawn")
main()