#NEWLINE# def fork( executable , args = ( ) , env = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , path = None , timeout = 3600 ) : #NEWLINE# #INDENT# 'fork\n    Provides a deferred wrapper function with a timeout function\n\n    :param executable: Executable\n    :type executable: str.\n    :param args: Tupple of arguments\n    :type args: tupple.\n    :param env: Environment dictionary\n    :type env: dict.\n    :param timeout: Kill the child process if timeout is exceeded\n    :type timeout: int.\n    ' #NEWLINE# d = defer . Deferred ( ) #NEWLINE# p = ProcessProtocol ( d , timeout ) #NEWLINE# reactor . spawnProcess ( p , executable , ( ( executable , ) + tuple ( args ) ) , env , path ) #NEWLINE# return d