MT#6633 Fix stdout redirection in the daemonize procedure.