Robust Cleanup #3

cgriego opened this Issue May 24, 2011 · 2 comments


None yet
2 participants

cgriego commented May 24, 2011

Headless should call headless.destroy in an ensure block within the run method so that it still cleans up if the yielded code raises an exception. Headless could also register an at_exit hook when a new Headless instance is instantiated to cleanup the process if it is still running when the Ruby process exits. Right now it's very easy for the Headless gem to leave Xvfb running.


leonid-shevtsov commented May 25, 2011

Yep, that is reasonable. Thanks for mentioning.


leonid-shevtsov commented Aug 26, 2011


this has been addressed in v0.2.1.

Xvfb is now automatically stopped at exit unless you pass a special option to the constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment