Deadlock issue when using Python’s subprocess module
I ran into an issue yesterday when calling an external Java application from Python using the subprocess module. The Java application loaded but appeared to have stopped executing after loading its properties files (last entry in the log file is after loading the properties file).
My Python code looked something like this:
import subprocess javaApplication = subprocess.Popen(["java", "-jar", "application.jar"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) # The wait() function is actually not a good idea to use # when …