Improve closing of editor

(backend process termination,...)

This is still experimental and needs to be tested on GNU/Linux and Mac OSX