Skip to content

Commit

Permalink
set 'fork' as the default process start method
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Zhang <[email protected]>
  • Loading branch information
MarkintoshZ committed Oct 28, 2023
1 parent ee1acd3 commit d685171
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion acto/runner/runner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import base64
import queue
import time
from multiprocessing import Process, Queue
from multiprocessing import Process, Queue, set_start_method, get_start_method

import yaml

Expand Down Expand Up @@ -60,6 +60,9 @@ def __init__(self,
'role_binding': self.rbacAuthorizationV1Api.list_namespaced_role_binding,
}

if get_start_method() != "fork":
set_start_method("fork")

def run(self, input: dict, generation: int) -> Tuple[Snapshot, bool]:
'''Simply run the cmd and dumps system_state, delta, operator log, events and input files without checking.
The function blocks until system converges.
Expand Down

0 comments on commit d685171

Please sign in to comment.