summaryrefslogtreecommitdiff
path: root/src/mswindows.c
diff options
context:
space:
mode:
authorlosgrandes <pwajda@gmail.net.pl>2016-10-21 17:12:58 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2016-10-21 19:33:29 +0200
commitdd5c549f6af8e1143e1a6ef66725eea4bcd9ad50 (patch)
tree180039bbbf8144d8f06c1d62283052d2da9af714 /src/mswindows.c
parent78e0ec5f0389f09fe81546235724933e6a37ba6e (diff)
downloadwget-dd5c549f6af8e1143e1a6ef66725eea4bcd9ad50.tar.gz
Fixes #45790: wget prints it's progress even when background
* src/log.c: Use tcgetpgrp(STDIN_FILENO) != getpgrp() to determine when to print to STD* or logfile. Deprecate log_request_redirect_output function. Use different file handles for STD* and logfile, to easily switch between them when changing fg/bg. * src/log.h: Make redirect_output function externally linked. * src/main.c: Don't use deprecated log_request_redirect_output function. Use redirect_output instead. * src/mswindows.c: Don't use deprecated log_request_redirect_output function. Use redirect_output instead.
Diffstat (limited to 'src/mswindows.c')
-rw-r--r--src/mswindows.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mswindows.c b/src/mswindows.c
index 9735370e..90e6ec4f 100644
--- a/src/mswindows.c
+++ b/src/mswindows.c
@@ -53,9 +53,6 @@ as that of the covered work. */
#endif
-/* Defined in log.c. */
-void log_request_redirect_output (const char *);
-
/* Windows version of xsleep in utils.c. */
void
@@ -98,7 +95,7 @@ static void
ws_hangup (const char *reason)
{
fprintf (stderr, _("Continuing in background.\n"));
- log_request_redirect_output (reason);
+ redirect_output (true, reason);
/* Detach process from the current console. Under Windows 9x, if we
were launched from a 16-bit process (which is usually the case;