Lines Matching +full:in +full:- +full:process
7 # Copyright (c) 2006-2008, R Oudkerk
17 from . import process
59 if len(argv) >= 2 and argv[1] == '--multiprocessing-fork':
67 Run code for process object if this in not the main process
71 for arg in sys.argv[2:]:
83 Returns prefix of command line used for spawning a child process
86 return ([sys.executable, '--multiprocessing-fork'] +
87 ['%s=%r' % item for item in kwds.items()])
90 prog %= ', '.join('%s=%r' % item for item in kwds.items())
93 return [exe] + opts + ['-c', prog, '--multiprocessing-fork']
126 process.current_process()._inheriting = True
132 del process.current_process()._inheriting
137 if getattr(process.current_process(), '_inheriting', False):
139 An attempt has been made to start a new process before the
140 current process has finished its bootstrapping phase.
144 in the main module:
156 Return info about parent needed by child to unpickle process object
161 authkey=process.current_process().authkey,
173 sys_path[i] = process.ORIGINAL_DIR
179 orig_dir=process.ORIGINAL_DIR,
184 # Figure out whether to initialise main in the subprocess as a module
194 process.ORIGINAL_DIR is not None):
195 main_path = os.path.join(process.ORIGINAL_DIR, main_path)
201 # Prepare current process
208 Try to get current process ready to unpickle process object
210 if 'name' in data:
211 process.current_process().name = data['name']
213 if 'authkey' in data:
214 process.current_process().authkey = data['authkey']
216 if 'log_to_stderr' in data and data['log_to_stderr']:
219 if 'log_level' in data:
222 if 'sys_path' in data:
225 if 'sys_argv' in data:
228 if 'dir' in data:
231 if 'orig_dir' in data:
232 process.ORIGINAL_DIR = data['orig_dir']
234 if 'start_method' in data:
237 if 'init_main_from_name' in data:
239 elif 'init_main_from_path' in data:
242 # Multiprocessing module helpers to fix up the main module in
247 # populate anything in __main__, nor do we make any changes to
253 # If this process was forked, __main__ may already be populated
257 # Otherwise, __main__ may contain some non-main code where we need to
270 # If this process was forked, __main__ may already be populated
286 # If the parent process has sent a path through rather than a module
288 # non-main code that needs to be executed