Inspired by http://www.xargs.com/qml/process.html