Use shutdown request to properly close the backend process

This implementation works great on Windows but has not been test yet on linux