Refer to https://github.com/saleyn/erlexec