Posted: 2009-04-28 15:20 Tags: Python Note Much of the "What Happens When you Execute a Command?" is based on information in http://en.wikipedia.org/wiki/Redirection_(computing) so go there for the latest version. This post is released under the
程序经常卡死,定位了半天才定位到原因,原来是Popen导致的卡死: 程序如下: s = subprocess.Popen([*,*,*], stdout=subprocess.PIPE) ret = s.stdout.read() return ret 官方文档的解释是: This will deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a p