{"id":144,"date":"2006-12-11T22:43:39","date_gmt":"2006-12-12T02:43:39","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/2006-12-11\/killableprocesspy\/"},"modified":"2006-12-22T16:49:19","modified_gmt":"2006-12-22T20:49:19","slug":"killableprocesspy","status":"publish","type":"post","link":"http:\/\/benjamin.smedbergs.us\/blog\/2006-12-11\/killableprocesspy\/","title":{"rendered":"killableprocess.py"},"content":{"rendered":"<p>I&#8217;ve managed, at long last, to solve the <a href=\"http:\/\/benjamin.smedbergs.us\/blog\/2006-11-09\/adventures-in-python-launching-subprocesses\/\">problem of launching subprocesses from python<\/a>. I have created a python module which can launch a subprocess, wait for the process with a timeout, and kill that process and all of its sub-subprocesses correctly, on Windows, Mac, and Linux. <a href=\"http:\/\/svn.smedbergs.us\/python-processes\/trunk\/\">Source code is here.<\/a> It requires python 2.4+ because it subclasses the <a href=\"http:\/\/docs.python.org\/lib\/module-subprocess.html\">subprocess<\/a> module. On Windows, it only works on Win2k+, and it requires the <a href=\"http:\/\/docs.python.org\/lib\/module-ctypes.html\">ctypes<\/a> module, which comes with Python 2.5+, or can be installed into earlier versions of Python.<\/p>\n<p>You will be seeing a python-based tinderbox client appear on the MozillaTest tree shortly. Small projects or projects that don&#8217;t want or need the byzantine logic of the existing tinderbox client scripts can use a Python module to do tinderbox reporting using a simple object-oriented API. I&#8217;m hoping to use this to get Tamarin builds reporting to a tinderbox tree, as well as do some of the FF+XR build automation (which is significantly different from the existing build process).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve managed, at long last, to solve the problem of launching subprocesses from python. I have created a python module which can launch a subprocess, wait for the process with a timeout, and kill that process and all of its sub-subprocesses correctly, on Windows, Mac, and Linux. Source code is here. It requires python 2.4+ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[30,37,32],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-mozilla","tag-build-system","tag-killableprocess","tag-python"],"_links":{"self":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":0,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"wp:attachment":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}