In order to avoid hanging python processes listening to http server ports, the kill-old-processes script should terminate every python process, except for the python process running the script.
Created attachment 407399 [details] Patch
Comment on attachment 407399 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407399&action=review > Tools/BuildSlaveSupport/kill-old-processes:139 > + cmd = "ps af | grep -E '.+/python' | grep -v grep | grep -v " + str(os.getpid()) + " | awk '{print $2}' | xargs kill -9" Isn't builedbot also a python process?
(In reply to Jonathan Bedard from comment #2) > Comment on attachment 407399 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=407399&action=review > > > Tools/BuildSlaveSupport/kill-old-processes:139 > > + cmd = "ps af | grep -E '.+/python' | grep -v grep | grep -v " + str(os.getpid()) + " | awk '{print $2}' | xargs kill -9" > > Isn't builedbot also a python process? Ah, that is a good point! It might very well be. In Cygwin, it seems there is no information from ps about what script a python process is running.
(In reply to Per Arne Vollan from comment #3) > (In reply to Jonathan Bedard from comment #2) > > Comment on attachment 407399 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=407399&action=review > > > > > Tools/BuildSlaveSupport/kill-old-processes:139 > > > + cmd = "ps af | grep -E '.+/python' | grep -v grep | grep -v " + str(os.getpid()) + " | awk '{print $2}' | xargs kill -9" > > > > Isn't builedbot also a python process? > > Ah, that is a good point! It might very well be. In Cygwin, it seems there > is no information from ps about what script a python process is running. Wonder if we could preserve only the oldest Python process (which should be buildbot)
<rdar://problem/68279416>