Avoid creating empty wget-log when using -O and -q in background

* src/log.c (check_redirect_output): Check for quiet mode
This commit is contained in:
Tomas Korbar 2018-08-29 12:33:43 +02:00 committed by Tim Rühsen
parent 2f451dbf4e
commit 7ddcebd61e

View File

@ -974,7 +974,7 @@ check_redirect_output (void)
{
pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO);
if (foreground_pgrp != -1 && foreground_pgrp != getpgrp ())
if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet)
{
/* Process backgrounded */
redirect_output (true,NULL);