I am trying to start a logstash worker process from an action, but the action cannot exit normally unless I manually kill the logstash work.
def start_logstash(self, path_to_config, path_to_logstash): self.__update_logstash_config(path_to_config) executable = path_to_logstash + '/logstash' p = subprocess.Popen(executable + ' -f ' + path_to_config, stdout=subprocess.PIPE, shell=True, stderr=subprocess.PIPE, close_fds=True)
It seems that in the python action, the popen did not return immediatly as it does in normal python scripts. However, actually my purpose is just start the program and exit the action. Is there any restrction? Thank you