Fix how the stdin/stdout fds are set to null during Daemonize().

Fixes #5951

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>