Make daemon mode work on Linux