cgoldberg/xvfbwrapper — pull request #2 by kierun (2013-01-14 15:00:10+00:00)
Title: Send SIGTERM to all Xvfb processes.

There is a dangling process bug in the code as it stands. Try this:
In [1]: from xvfbwrapper import Xvfb
In [2]: vdisplay = Xvfb(width=1280, height=720)
In [3]: vdisplay.start()
=> [In another shell, check all Xvfb, you will find there are two. ]
In [4]: vdisplay.stop()
=> [Check Xvfb, you will find one left.]

In the code in this commit, there is a group for all processes started by
subprocess. This group is then send SIGTERM thus killing all the processes
started.