@@ -284,7 +284,7 @@ def kill_process(self, pid):
284
284
return True
285
285
286
286
def create_process (self , command_string , wait_for_output = True , remote_output_file_name = None ,
287
- working_directory = None , wait_timeout = 30 ):
287
+ working_directory = None , wait_timeout = 30 , wait_for_completion = True ):
288
288
"""
289
289
Create a new process with the specified command string.
290
290
@@ -296,10 +296,11 @@ def create_process(self, command_string, wait_for_output=True, remote_output_fil
296
296
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
297
297
298
298
:param str command_string: command string used for the create process operation
299
- :param bool wait_for_output: Block on output from the new process
299
+ :param bool wait_for_output: Block on output from the new process (execute in foreground)
300
300
:param str remote_output_file_name: The remote output file name used for process output
301
301
:param str working_directory: The working directory of the create process operation
302
302
:param int wait_timeout: Time out used for this live response command
303
+ :param bool wait_for_completion: Wait until the process is completed before returning
303
304
:return: returns the output of the command string
304
305
:rtype: str
305
306
"""
@@ -310,7 +311,7 @@ def create_process(self, command_string, wait_for_output=True, remote_output_fil
310
311
# - get the temporary file from the endpoint
311
312
# - delete the temporary file
312
313
313
- data = {"name" : "create process" , "object" : command_string , "wait" : False }
314
+ data = {"name" : "create process" , "object" : command_string , "wait" : wait_for_completion }
314
315
315
316
if wait_for_output and not remote_output_file_name :
316
317
randfilename = self ._random_file_name ()
0 commit comments